Hello,
I’m having issues running the cmdlets in the PowerShellGet module due to errors binding to the Name parameter on Install-Module and others.
I’m running Windows 10 Pro 1511 on PowerShell version 5.0.10586.122.
PowerShellGet is version 1.0.0.1 and PackageManagement is 1.0.0.1
What I’m seeing:
C:\> Install-Module -Name 'PS.B2' WARNING: Cannot bind argument to parameter 'name' because it is an empty string.
This happens for any attempted install.
A stack trace.
C:\> Install-Module -Name 'PS.B2' DEBUG: 00:00:00 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.0000214 Name: PS.B2 DEBUG: 00:00:00.0006394 INVOKING PowerShell Fn Get-DynamicOptions with args Provider that has length 1 DEBUG: 00:00:00.0011700 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.0024701 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:00.0047517 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.0047704 Name: PS.B2 DEBUG: 00:00:00.0052680 INVOKING PowerShell Fn Get-DynamicOptions with args Source that has length 1 DEBUG: 00:00:00.0057809 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.0079721 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:00.0115407 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.0115613 Name: PS.B2 DEBUG: 00:00:00.0121130 INVOKING PowerShell Fn Get-DynamicOptions with args Package that has length 1 DEBUG: 00:00:00.0125992 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.0151642 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:00.0182846 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.0183024 Name: PS.B2 DEBUG: 00:00:00.0188547 INVOKING PowerShell Fn Get-DynamicOptions with args Install that has length 1 DEBUG: 00:00:00.0193001 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.0216431 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:00.0829474 Calling SearchForPackages. Name='PS.B2' DEBUG: 00:00:00.0840724 PackageProvider::FindPackage with name PS.B2 DEBUG: 00:00:00.0894369 Calling SearchForPackages After Select 1 DEBUG: 00:00:00.0942080 Calling New() : MethodName = 'FindPackage' DEBUG: 00:00:00.0958598 ProviderName: PowerShellGet DEBUG: 00:00:00.0968112 Type: Module DEBUG: 00:00:00.1014778 Scope: AllUsers DEBUG: 00:00:00.1025773 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:00.1086929 Name: PS.B2 DEBUG: 00:00:00.1101304 INVOKING PowerShell Fn Find-Package with args System.String[], , , that has length 4 DEBUG: 00:00:00.1174410 In PowerShellGet Provider - 'Find-Package'. DEBUG: 00:00:00.1183825 OPTION: ProviderName => PowerShellGet DEBUG: 00:00:00.1246427 OPTION: Type => Module DEBUG: 00:00:00.1284618 OPTION: Scope => AllUsers DEBUG: 00:00:00.1297889 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:00.1366886 OPTION: Name => PS.B2 DEBUG: 00:00:00.1447721 PackageProvider::FindPackage with name PS.B2 DEBUG: 00:00:00.1498038 Calling 'NuGet'::'FindPackage' - name='PS.B2', requiredVersion='',minimumVersion='', maximumVersion='''. DEBUG: 00:00:00.1516345 Iterating 'PS.B2'. DEBUG: 00:00:00.1546262 There are '1' registered sources in 'NuGet' provider. DEBUG: 00:00:00.1577787 Source 'https://www.powershellgallery.com/api/v2/' is not one of the registered sources in 'NuGet' provider. DEBUG: 00:00:01.5077083 Source 'https://www.powershellgallery.com/api/v2/' is validated. DEBUG: 00:00:01.5094951 Calling 'NuGetRequest'::'GetPackageById', 'PS.B2'. DEBUG: 00:00:01.6895655 Calling 'HttpClientPackageRepository'::'FindPackagesById', 'PS.B2'. DEBUG: 00:00:01.6913607 Calling 'NuGetClient'::'FindPackage'. DEBUG: 00:00:01.6932891 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PS.B2'&$skip=0&$top=40'. DEBUG: 00:00:02.0464745 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PS.B2'&$skip=0&$top=40'. DEBUG: 00:00:02.0483073 '2' packages recevied in the last request. DEBUG: 00:00:02.0502829 Completed iterating for 'PS.B2'. DEBUG: 00:00:02.0660045 Done calling powershell «Find-Package» «PSModule» DEBUG: 00:00:02.0720486 Calling New() : MethodName = 'GetInstalledPackages' DEBUG: 00:00:02.0736516 ProviderName: PowerShellGet DEBUG: 00:00:02.0759600 Type: Module DEBUG: 00:00:02.0838472 Scope: AllUsers DEBUG: 00:00:02.0858947 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:02.0893809 Name: PS.B2 DEBUG: 00:00:02.0907668 INVOKING PowerShell Fn Get-InstalledPackage with args PS.B2, 1.0.0, , that has length 4 DEBUG: 00:00:02.0956996 In PowerShellGet Provider - 'Get-InstalledPackage'. DEBUG: 00:00:02.0970768 OPTION: ProviderName => PowerShellGet DEBUG: 00:00:02.1034201 OPTION: Type => Module DEBUG: 00:00:02.1048126 OPTION: Scope => AllUsers DEBUG: 00:00:02.1082285 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:02.1093492 OPTION: Name => PS.B2 WARNING: Cannot bind argument to parameter 'name' because it is an empty string. DEBUG: 00:00:02.1593889 MSG:ScriptStackTrace « at System.Management.Automation.ParameterBinderBase.ValidateNullOrEmptyArgument(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, Type argumentType, Object parameterValue, Boolean recurseIntoCollections) at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags) at System.Management.Automation.CmdletParameterBinderController.BindParameter(CommandParameterInternal argument, MergedCompiledCommandParameter parameter, ParameterBindingFlags flags) at System.Management.Automation.CmdletParameterBinderController.BindParameter(UInt32 parameterSets, CommandParameterInternal argument, MergedCompiledCommandParameter parameter, ParameterBindingFlags flags) at System.Management.Automation.CmdletParameterBinderController.BindParameters(UInt32 parameterSets, Collection`1 arguments) at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments) at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments) at System.Management.Automation.CommandProcessor.BindCommandLineParameters() at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues) at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream) at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)» DEBUG: 00:00:02.1677405 Done calling powershell «Get-InstalledPackage» «PSModule»
What I’ve Tried:
- I’ve tried replacing the PackageManagement and PowerShellGet module folders from a working Windows 10 Pro install however the issue remained even while it did not occur on the working Windows 10 install I pulled them from.
- I’ve also tried reinstalling NuGet to version 2.8.5.204 and that did not help either.
- Lots of Googling but I’m unable to come up with anything related to this.