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
{{ message }}
Repository navigation
WSMan provider throws exception for non-existent path with -PathType Container #11278
Exception is thrown: "Test-Path: Value cannot be null. (Parameter 'value')":
The $Error[1].Exception.InnerException.InnerException.StackTrace (since $Error[0] is the error for Invoke) shows:
at System.String.StartsWith(String value, StringComparison comparisonType)
at Microsoft.WSMan.Management.WSManConfigProvider.NormalizePath(String path, String host)
at Microsoft.WSMan.Management.WSManConfigProvider.IsItemContainer(String path)
at System.Management.Automation.SessionStateInternal.IsItemContainer(CmdletProvider providerInstance, String path, CmdletProviderContext context)
Environment data
Name Value
---- -----
PSVersion 7.0.0-preview.6
PSEdition Core
GitCommitId 7.0.0-preview.6
OS Microsoft Windows 10.0.18363
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0, ...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Activity
heaths commentedon Dec 6, 2019
It's worth pointing out that
test-path wsman:\foo -pathtype leafsucceeds (i.e. returns$falseinstead of throwing).Work around bug with test-path in WSMan provider