PowerShell 2.0: One Cmdlet at a Time 45 Connect-WSMan
Continuing the series looking at new cmdlets available in PowerShell 2.0. This time we look at the Connect-WSMan cmdlet.
What can I do with it?
Create a connection to a remote computer using WS-Management .
Example:
Connect to the remote server Test01 using WS-Management . Use the WSMan provider to examine the WSMan Shell properties and change the value for MaxShellsPerUser to 10.
Connect-WSMan -ComputerName Test01 cd wsman: dir
cd .\localhost dir | Format-Table -AutoSize
cd Shell dir | Format-Table -AutoSize
Set-Item -Path MaxShellsPerUser -Value 10 dir | Format-Table -AutoSize
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.