Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

WindowsFeature: Property source in resource WindowsFeature is not a valid property #150

Open
SylvainMartel opened this issue May 8, 2019 · 3 comments · May be fixed by #169
Open

WindowsFeature: Property source in resource WindowsFeature is not a valid property #150

SylvainMartel opened this issue May 8, 2019 · 3 comments · May be fixed by #169
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.

Comments

@SylvainMartel
Copy link

SylvainMartel commented May 8, 2019

Details of the scenario you tried and the problem that is occurring

With the default ressource that comes with Windows, I have no problem installing the windows feature Dot Net 3.5. But when I install the latest PSDSCResources, the DSC resource fails with Property source in resource WindowsFeature is not a valid property

The source property is required because the source for Dot Net 3.5 is not included locally.

Verbose logs showing the problem

Undefined property source
At line:9, char:2
Buffer:
irectResourceAccess";
};^
insta
+ CategoryInfo : SyntaxError: (root/Microsoft/...gurationManager:String) [], CimException
+ FullyQualifiedErrorId : MiClientApiError_Failed
+ PSComputerName : localhost

Suggested solution to the issue

The DSC configuration that is used to reproduce the issue (as detailed as possible)

    ensure: 'Present'
    name: 'NET-Framework-Core'
    source: '<pathtoshare>\Sources\W2019\Sxs\'   

The operating system the target node is running

Version and build of PowerShell the target node is running

Version of the DSC module that was used ('dev' if using current dev branch)

2.10.0

@mhendric
Copy link
Contributor

mhendric commented May 9, 2019

Hi @kinwolfqc . Can you confirm whether or not you re-compiled your configuration on a machine that has this latest module, and also that has the same PowerShell version as the target machine? If you didn't recompile, I'd recommend doing so on a machine with a module and PowerShell version that matches the target. Thanks.

@SylvainMartel
Copy link
Author

SylvainMartel commented May 10, 2019

Hi @mhendric

There is no mof in our setup(Ansible + the win_dsc module) and we can reproduce the problem directly by doing a Invoke-DscResource -Name WindowsFeature -Method Set -Property @{name = 'NET-Framework-Core'; source = '\\<snip>\Sources\W2019\Sxs\'} -ModuleName PSDSCResources -Verbose (which is basically what ansible does too on the target host)

And to test the in-box WindowsFeature, we remove the PSDSCResources on the target host and run the following command:

Invoke-DscResource -Name WindowsFeature -Method Set -Property @{name = 'NET-Framework-Core'; source = '\\<snip>\Sources\W2019\Sxs\'} -ModuleName PSDesiredStateConfiguration -Verbose

This works fine

@mhendric mhendric added bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community. labels May 10, 2019
@mhendric
Copy link
Contributor

Alright, sounds like a bug. I'll mark it as such. Thanks for the submission.

@machgo machgo linked a pull request Sep 4, 2019 that will close this issue
9 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants