You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
When using a private repository (for example, a VSTS / NuGet based repository), using Credentials is required. Find-Module and Find-Script support the use of a -Credential parameter, while Find-DscResource does not. Using a private repository for DscResources is not possible.
Expected Behavior
It would be expected that Find-DscResource takes a -Credential parameter
PS > Find-DscResource -Repository Dummy
WARNING: Cannot access 'https://my.pkgs.visualstudio.com/_packaging/Dummy/nuget/v2/'. Are you missing 'Credential'
parameter in the cmdlet?
WARNING: Unable to resolve package source 'https://my.pkgs.visualstudio.com/_packaging/Dummy/nuget/v2/'.
With -Credential:
PS > Find-DscResource -Repository Dummy -Credential $credential
Find-DscResource : A parameter cannot be found that matches parameter name 'Credential'.
At line:1 char:54
+ ... d-DscResource -Repository Dummy -Credential $credential ...
+ ~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Find-DscResource], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Find-DscResource
Possible Solution
Support providing credentials on Find-DscResource, equal to Find-Module or Find-Script.
Context
Working with a private VSTS / NuGet based repository, requiring credentials (a personal access token.
changed the title [-]Find-DscResource does not support -Credential (for private repositories)[/-][+]Find-DscResource does not support -Credential[/+]on Apr 6, 2018
It appears this is important accross the board. I would like to use private feeds for provisioning Azure resources with DSC. I'm limited to the PS Gallery.
The cmdlets that are wrapped here support a PSCredential object and Azure Automation supports PSCredentials. Would be great if the arguments for the DSC matched the cmdlets they wrap.
Activity
[-]Find-DscResource does not support -Credential (for private repositories)[/-][+]Find-DscResource does not support -Credential[/+]cpumanaz commentedon Jun 26, 2019
It appears this is important accross the board. I would like to use private feeds for provisioning Azure resources with DSC. I'm limited to the PS Gallery.
https://github.com/PowerShell/PowerShellGet/tree/development/DSC/Examples
The cmdlets that are wrapped here support a PSCredential object and Azure Automation supports PSCredentials. Would be great if the arguments for the DSC matched the cmdlets they wrap.