Scripting. Powershell, VMware, Windows, Active Directory & Exchange. All that kind of stuff…..
RSS icon Email icon Home icon
  • PowerShell 2.0: One Cmdlet at a Time #50 Set-WSManInstance

    Posted on January 29th, 2010 Jonathan Medd No comments

    Continuing the series looking at new cmdlets available in PowerShell 2.0. This time we look at the Set-WSManInstance cmdlet.

    What can I do with it?

    Change the properties of a management resource for use with WS-Management.

    Example:

    Set the Enabled property of the HTTPS listener created with New-WSManInstance to false, effectively disabling it. Tip: watch out for case sensitivity in ValueSet

    Set-WSManInstance winrm/config/listener 
    -SelectorSet @{address="*";transport="https"}
    -ValueSet @{Enabled="false"}

    Set-WSManInstance

    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.

    1000 things 1% better!

    Leave a reply