PowerShell 2.0: One Cmdlet at a Time 52 New-WSManSessionOption
Continuing the series looking at new cmdlets available in PowerShell 2.0. This time we look at the New-WSManSessionOption cmdlet.
What can I do with it?
Create a session option hash table for use with the WS-Management cmdlets Get-WSManInstance, Set-WSManInstance, Invoke-WSManAction and Connect-WSMan.
Example:
Create a session option hash table for use with the Set-WSManInstance cmdlet to update the HTTPS listener created with New-WSManInstance .
$options = New-WSManSessionOption -OperationTimeout 1000 -SkipRevocationCheck Set-WSManInstance winrm/config/listener -SelectorSet @{address="*";transport=“https”} -SessionOption $options
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.