user1462199
user1462199

Reputation:

WSMan PowerShell Provider?

How come if you:

Get-PSProvider

You cant see a provider for WSMan, but you can:

Set-Location WSMan:\

Upvotes: 2

Views: 795

Answers (1)

Shay Levy
Shay Levy

Reputation: 126802

In PowerShell 3.0, WSMAN is a part of the Microsoft.WSMan.Management module which is not loaded by default. If you execute one of the Management module commands, PowerShell implicitly loads the module and the WSMAN drive is visible.

PS> Test-WSMan

wsmid           : http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd
ProtocolVersion : http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd
ProductVendor   : Microsoft Corporation
ProductVersion  : OS: 0.0.0 SP: 0.0 Stack: 3.0


PS> Get-PSProvider | ft name

Name
----
Alias
Environment
FileSystem
Function
Registry
Variable
WSMan

Alternatively you can explicitly load the Management module.

Upvotes: 2

Related Questions