question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Find-PSResource Name parameter must be provided

See original GitHub issue

Prerequisites

  • 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:closed
  • Created a year ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ThomasNietocommented, May 14, 2022

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?

nuget.exe list
0reactions
SydneyhSmithcommented, Jul 10, 2023

Closing this issue as the help has been updated

Read more comments on GitHub >

github_iconTop 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 >
pipeline.parameters.parameter definition
Represents a value passed to a pipeline.
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found