PowerShell 2.0: One Cmdlet at a Time 48 Get-WSManInstance
Continuing the series looking at new cmdlets available in PowerShell 2.0. This time we look at the Get-WSManInstance cmdlet.
What can I do with it?
Retrieve an instance of a management resource specified by a URI by using WS-Management.
Examples:
Display management information for the BITS service on the remote computer Test01.
Get-WSManInstance wmicimv2/win32_service -selectorset @{name=“BITS”} -computername Test01
Notice that you receive many properties for the BITS service.
Display management information for the WS-Management listener configuration on the remote computer Test01.
Get-WSManInstance winrm/config/listener -selectorset @{Address="*";Transport=“http”} -computername Test01
Notice that you receieve a number of properties of the listener.
How could I have done this in PowerShell 1.0?
Support for the use of WS-Management in PowerShell is provided as part of the 2.0 release.