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
Trying to install a resource with the -NoClobber parameter causes the install to fail in all instances regardless if there is a conflict or not.
Expected behavior
# installs
Actual behavior
Install-PSResource snmp -NoClobber -TrustRepository -PassThruInstall-PSResource: Unable to successfully install package 'SNMP': 'Object reference not set to an instance of an object.'
Error details
Exception : Type : System.Management.Automation.PSInvalidOperationException ErrorRecord : Exception : Type : System.Management.Automation.ParentContainsErrorRecordException Message : Unable to successfully install package 'SNMP': 'Object reference not set to an instance of anobject.' HResult : -2146233087 CategoryInfo : InvalidOperation: (:) [], ParentContainsErrorRecordException FullyQualifiedErrorId : InvalidOperation Message : Unable to successfully install package 'SNMP': 'Object reference not set to an instance of anobject.' InnerException : Type : System.NullReferenceException TargetSite : Name : DetectClobber DeclaringType : Microsoft.PowerShell.PowerShellGet.Cmdlets.InstallHelper, PowerShellGet, Version=3.0.19.0,Culture=neutral, PublicKeyToken=null MemberType : Method Module : PowerShellGet.dll Message : Object reference not set to an instance of an object. Source : PowerShellGet HResult : -2147467261 StackTrace : at Microsoft.PowerShell.PowerShellGet.Cmdlets.InstallHelper.DetectClobber(String pkgName, HashtableparsedMetadataHashtable) at Microsoft.PowerShell.PowerShellGet.Cmdlets.InstallHelper.InstallPackage(List`1 pkgsToInstall, String repoName,String repoUri, PSCredentialInfo repoCredentialInfo, PSCredential credential, Boolean isLocalRepo, ScopeType scope) HResult : -2146233079TargetObject : Microsoft.PowerShell.PowerShellGet.Cmdlets.InstallPSResourceCategoryInfo : InvalidOperation: (Microsoft.PowerShel…s.InstallPSResource:InstallPSResource)[Install-PSResource], PSInvalidOperationExceptionFullyQualifiedErrorId : InstallPackageFailed,Microsoft.PowerShell.PowerShellGet.Cmdlets.InstallPSResourceInvocationInfo : MyCommand : Install-PSResource ScriptLineNumber : 1 OffsetInLine : 1 HistoryId : 1 Line : Install-PSResource snmp -NoClobber -TrustRepository -PassThru PositionMessage : At line:1 char:1 + Install-PSResource snmp -NoClobber -TrustRepository -PassThru + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ InvocationName : Install-PSResource CommandOrigin : InternalScriptStackTrace : at <ScriptBlock>, <No file>: line 1PipelineIterationInfo :
Environment data
Name Version
-----------
PowerShellGet 3.0.19
Name Value
---------
PSVersion 7.3.2
PSEdition Core
GitCommitId 7.3.2
OS Microsoft Windows 10.0.19044
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
The text was updated successfully, but these errors were encountered:
Prerequisites
Steps to reproduce
Trying to install a resource with the
-NoClobber
parameter causes the install to fail in all instances regardless if there is a conflict or not.Expected behavior
# installs
Actual behavior
Error details
Environment data
Visuals
No response
The text was updated successfully, but these errors were encountered: