-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.The issue is fixed.
Description
Steps to reproduce
Invoke the following:
[WMIClass] "\\$env:computerName\root\default:StdRegProv"
Expected behavior
Like in Windows PowerShell 5.1 and PowerShell 6.2.1, a ManagementClass object should be returned:
NameSpace: ROOT\default
Name Methods Properties
---- ------- ----------
StdRegProv {CreateKey, DeleteK… {}
Actual behavior
Cannot convert value "\\SBAHOME\root\default:StdRegProv" to type "System.Management.ManagementClass". Error: "Cannot marshal 'parameter #3': Cannot marshal a string by-value with the [Out] attribute."
At line:1 char:1
+ [WMIClass] "\\$env:computerName\root\default:StdRegProv"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvalidCastToWMIClass
Environment data
PS C:/Users/steph> $PSVersionTable
Name Value
---- -----
PSVersion 7.0.0-preview.1
PSEdition Core
GitCommitId 7.0.0-preview.1
OS Microsoft Windows 10.0.18362
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Metadata
Metadata
Assignees
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.The issue is fixed.