Find-PSResource Name parameter must be provided
See original GitHub issuePrerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
Steps to reproduce
Find-PSResource errors out without a -Name
parameter passed.
Expected behavior
Returns resources
Actual behavior
Find-PSResource: Name parameter must be provided.
Error details
Exception :
Type : System.Management.Automation.PSInvalidOperationException
ErrorRecord :
Exception :
Type : System.Management.Automation.ParentContainsErrorRecordException
Message : Name parameter must be provided.
HResult : -2146233087
CategoryInfo : InvalidOperation: (:) [], ParentContainsErrorRecordException
FullyQualifiedErrorId : InvalidOperation
TargetSite :
Name : ThrowTerminatingError
DeclaringType : System.Management.Automation.MshCommandRuntime, System.Management.Automation, Version=7.2.3.500, Culture=neutral, PublicKeyToken=31bf3856ad364e35
MemberType : Method
Module : System.Management.Automation.dll
Message : Name parameter must be provided.
Source : System.Management.Automation
HResult : -2146233079
StackTrace :
at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)
TargetObject : Microsoft.PowerShell.PowerShellGet.Cmdlets.FindPSResource
CategoryInfo : InvalidOperation: (Microsoft.PowerShel…lets.FindPSResource:FindPSResource) [Find-PSResource], PSInvalidOperationException
FullyQualifiedErrorId : NameParameterNotProvided,Microsoft.PowerShell.PowerShellGet.Cmdlets.FindPSResource
InvocationInfo :
MyCommand : Find-PSResource
ScriptLineNumber : 1
OffsetInLine : 1
HistoryId : 1
Line : Find-PSResource
PositionMessage : At line:1 char:1
+ Find-PSResource
+ ~~~~~~~~~~~~~~~
InvocationName : Find-PSResource
CommandOrigin : Internal
ScriptStackTrace : at <ScriptBlock>, <No file>: line 1
Environment data
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Binary 3.0.12 beta PowerShellGet {Find-PSResource, Get-PSResource, Get-PSResourceRepository, Install-PSResource…}
Name Value
---- -----
PSVersion 7.2.3
PSEdition Core
GitCommitId 7.2.3
OS Microsoft Windows 10.0.19043
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
No response
Issue Analytics
- State:
- Created a year ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Azure Pipeline - Why parameter value is required
For this issue, currently this is by design: "# default value; if no default, then the parameter MUST be given by the user...
Read more >Cannot use parameter / variables for 'azureSubscription' in ...
Pass in the subscription name as a parameter from a root yaml file and you don't need to hardcode anything. I do it...
Read more >Cannot use the value of a parameter as the name ...
Using Azure DevOps Multi-Stage pipelines, I'm running into this issue. In the Azure-pipelines.yml file, I am defining a variable as such:
Read more >AWS CloudFormation Create/Update Stack task
A value must be provided if *Template Parameters Source is set to Inline. CloudFormation expects the file to contain an array of one...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Furthermore NuGet which PowerShellGet leverages for its package management capabilities, does not require any search filtering when querying the public repository. Why make this requirement on PowerShellGet when NuGet can do this just fine on their public repository?
Closing this issue as the help has been updated