Enabling WinRM with Powershell

In the v2 CTP drop, there is a script called Configure-WSman.ps1 that does a few things including opening up firewall rules and setting up Windows Remote Management. This script was written by MS to configure all the requirements for remoting with Powershell V2.

I have been using it on a my dev boxes to enable and configure WinRM without PS v2 so I can use WinRS to manage them.

I have been running the script my 2008 server machines and then I use my Vista desktop to manage them.

In order to run a command on a remote server I just need to run the following command

winrs -r:server command

Pretty darn slick.

Also, here is the code for Configure-WSMan.ps1

 

   1: ################################################################
   2: #
   3: # Name: Configure-WSMan
   4: #
   5: # Desc: Configures WSMan to enable PowerShell remoting
   6: #
   7: ################################################################
   8:  
   9: param($action, [switch]$force, [switch]$help)
  10: trap { Write-Host -ForeGroundColor Red "Error: $_"; exit 1 }
  11:  
  12: if ($args -contains "-?" -or $args -contains "/?" -or $help)
  13: {
  14: @"
  15: NAME
  16:     Configure-WSMan
  17:  
  18: SYNOPSIS
  19:     Configures WSMan to enable PowerShell remoting
  20:  
  21: SYNTAX
  22:     Configure-WSMan [-action <actionparam>] [-force] [-help]
  23:  
  24: DETAILED DESCRIPTION
  25:     This script configures WSMan service to enable PowerShell
  26:     remoting. The settings are set to a value with which 
  27:     PowerShell remoting can work without any glitches. Its
  28:     generally recommended not to modify these values that this
  29:     script sets by default. 
  30:     The script makes the following modifications in your system:
  31:           - Maximum shells a remote user can launch on this 
  32:             machine = 16
  33:           - Maximum number of users who can connect concurrently 
  34:             to this machine = 5
  35:           - Maximum memory that can be allocated to a remotely 
  36:             lauched shell (any remotely launched PowerShell) = 150 MB
  37:           - Timeout for client to wait for server response = 3 mins
  38:           - Maximum provider requests that a lauched shell in the
  39:             server will support (any remote PowerShell instance
  40:             launched typically has 6 requests) = 400          
  41:           - Maximum connections on the service = 50
  42:           - Creates a HTTP listener that can bind to incoming requests
  43:             from any IP address
  44:           - Opens port 80 and 443 on your system
  45:           - Creates a default WSMan shell for launching PowerShell
  46:             remotely
  47:  
  48: PARAMETERS
  49:     -action
  50:         Allows the user to specify advanced configuration actions
  51:         CreateShell - creates a new WSMan shell
  52:         SetWSManParameter - sets a WSMan parameter
  53:         GetWSManConfig - gets the current WSMan configuration
  54:     -force
  55:         Do not prompt the user, force configure WSMan
  56:     -help
  57:         Show this help information
  58:  
  59: REMARKS
  60:     Do not modify any of the above settings unless you are
  61:     absolutely sure on what those WSMan settings mean.
  62:     Ensure that on Vista/Longhorn you run this script from an 
  63:     elevated PowerShell prompt
  64: "@
  65: exit 1
  66: }
  67:  
  68: #Globals
  69: $Downlevel = "Downlevel"
  70: $Vista = "Vista"
  71:  
  72: #Error Messages
  73: $ErrorMsgs = @{}
  74: $ErrorMsgs += @{ErrorPort80 ="Error opening port 80 on system. `nCheck if the 'Windows Firewall/Internet Connection Sharing (ICS)' service is running using the following command:`n`n`t get-service SharedAccess`n`nIf the service is not running, use the following to start the service:`n`n`t netsh firewall set opmode enable`n "}
  75: $ErrorMsgs += @{ErrorPort443 = "Error opening port 443 on system.`nCheck if the 'Windows Firewall/Internet Connection Sharing (ICS)' service is running using the following command:`n`n`t get-service SharedAccess`n`nIf the service is not running, use the following to start the service:`n`n`t netsh firewall set opmode enable`n "}
  76: $ErrorMsgs += @{
  77:     ErrorRestore = "Error restoring default WSMan configuration. Exiting"
  78:     ErrorMaxShellsPerUser = "Error Setting MaxShellsPerUser"
  79:     ErrorMaxConcurrentUsers = "Error setting MaxConcurrentUsers"
  80:     ErrorMaxMemoryPerShellMB = "Error setting MaxMemoryPerShellMB"
  81:     ErrorMaxTimeoutms = "Error setting MaxTimeoutms"
  82:     ErrorMaxProviderRequests = "Error setting MaxProviderRequests"
  83:     ErrorMaxConnections = "Error setting MaxConnections"
  84:     ErrorCreateListener = "Error creating HTTP listener"
  85:     ErrorCreateCustomShell = "Error creating PowerShell custom shell on WSMan"
  86: }
  87:  
  88: $commands =@(
  89:     "winrm set winrm/config/winrs `'@{MaxShellsPerUser=`"16`"}`'", 
  90:     "winrm set winrm/config/winrs `'@{MaxConcurrentUsers=`"5`"}`'",
  91:     "winrm set winrm/config/winrs `'@{MaxMemoryPerShellMB=`"150`"}`'",
  92:     "winrm set winrm/config `'@{MaxTimeoutms=`"180000`"}`'" ,
  93:     "winrm set winrm/config `'@{MaxProviderRequests=`"400`"}`'", 
  94:     "winrm set winrm/config/Service `'@{MaxConnections=`"50`"}`'", 
  95:     "winrm create winrm/config/Listener?Address=*+Transport=HTTP" 
  96: )
  97:  
  98: $commanderrors = @(
  99:     $ErrorMsgs["ErrorMaxShellsPerUser"],
 100:     $ErrorMsgs["ErrorConcurrnetUsers"],
 101:     $ErrorMsgs["ErrorMaxMemoryPerShellMB"],
 102:     $ErrorMsgs["ErrorMaxTimeoutms"],
 103:     $ErrorMsgs["ErrorMaxProviderRequests"],
 104:     $ErrorMsgs["ErrorMaxConnections"],
 105:     $ErrorMsgs["ErrorCreateListener"]
 106: )
 107:  
 108:  
 109: # Write-Message
 110: function Write-Message($msg)
 111: {
 112:     Write-Host -ForegroundColor Yellow $msg
 113: }
 114:  
 115: #write-error
 116: function Write-Error($msg)
 117: {
 118:     Write-Host -ForegroundColor Red $msg
 119: }
 120:  
 121: #function fixhash
 122: function fixhash ($h)
 123: {
 124:     $c=0
 125:    @('@{') +
 126:         $(foreach ($k in $h.get_keys())
 127:         { 
 128:             if ($c++) {';'}
 129:             "$k="
 130:            "`"$($h[$k])`""
 131:         }
 132:     ) +
 133:     "}"
 134: }
 135:  
 136: #Check-Error
 137: function Check-Error ($msg)
 138: {
 139:     if ($lastExitCode -ne 0){
 140:         Write-Error $msg
 141:     }
 142: }
 143:  
 144: #Create-Shell
 145: function Create-Shell
 146: {
 147:     Write-Host -noNewLine "Enter name for Shell (ex: Microsoft.PowerShell) : "
 148:     $name = Read-Host
 149:     Write-Host -noNewLine "Enter full path to server executable`n(ex: c:\windows\system32\WindowsPowerShell\v1.0\PowerShell.exe): "
 150:     $path = Read-Host
 151:     Write-Host -noNewLine "Enter arguments to server executable (optional)`n(ex: -s -nologo): "
 152:     $arguments = Read-Host
 153:     $fixhashparam = @('@{') + $("Shell=" 
 154:                                 "`"$path`"" 
 155:                                 ';' 
 156:                                 "Arguments=" 
 157:                                 "`"$arguments`"" 
 158:                                 ) + "}"
 159:     winrm create winrm/config/winrs/customremoteshell?uri=http://schemas.microsoft.com/wbem/winrm/1/windows/shell/$name $fixhashparam | out-null
 160:     Check-Error $ErrorMsgs["ErrorCreateCustomShell"]
 161: }
 162:  
 163: #Set winrm parameters
 164: function Set-winrmParameter
 165: {
 166:     $paramname = $args[0]
 167:     $value = $args[1]
 168:  
 169:     $i = -1
 170:     if ($paramname -ieq "maxshellsperuser"){$i = 0}
 171:     if ($paramname -ieq "maxconcurrentusers"){$i = 1}
 172:     if ($paramname -ieq "maxmemorypershellmb"){$i = 2}
 173:     if ($paramname -ieq "maxtimeoutms"){$i = 3}
 174:     if ($paramname -ieq "maxproviderrequests"){$i = 4}
 175:     if ($paramname -ieq "maxconnections"){$i = 5}
 176:     
 177:     if ($i -eq -1){
 178:         Write-Error "Specified parameter:$paramname is either not valid or cannot be modified"
 179:         exit 1
 180:     }
 181:  
 182:     $command = $commands[$i] -replace "[0-9]+", $value
 183:     Invoke-Expression $command > $null
 184:     Check-Error $commanderrors[$i]    
 185: }
 186:  
 187: #Detect the OS version. Installable varies as per the OS version
 188: $version = [system.environment]::OSVersion.Version
 189: $majorversion = $version.Major
 190: if ($majorversion -lt 6){
 191:    $os = $Downlevel
 192: }
 193: else{
 194:    $os = $vista
 195: }
 196:  
 197: #Check if elevated in case of Vista
 198: if ($os -eq $vista -and !$force){
 199:     #check if user is running elevated
 200:     $id = [System.Security.Principal.WindowsIdentity]::GetCurrent()
 201:     $p = New-Object System.Security.Principal.WindowsPrincipal($id)
 202:  
 203:     if (!$p.IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)){
 204:  
 205:         Write-Error "Configuration on Vista requires that user is elevated. Try Configuration from an elevated prompt"
 206:         exit 1
 207:     }
 208: }
 209:  
 210: #check if winrm service is installed before configuring
 211: if (!(Test-Path HKLM:\SYSTEM\CurrentControlSet\Services\winrm)){
 212:     Write-Error "winrm service is not installed"
 213:     exit 1
 214: }
 215:  
 216: if ($action -match "CreateShell"){
 217:     Create-Shell
 218:     exit 1
 219: }
 220: elseif ($action -match "SetWSManParameter"){
 221:     $WSManparam = Read-Host -prompt "Enter parameter to set"
 222:     $WSManparamvalue = Read-Host -prompt "Enter value"
 223:     Set-WinRMParameter $WSManparam $WSManparamvalue
 224: }
 225: elseif ($action -match "GetWSManConfig"){
 226:     winrm get winrm/config
 227: }
 228: elseif ($action -eq $null){
 229:  
 230:     Write-Message "Configuring WSMan"
 231:     winrm invoke restore winrm/config | out-null
 232:  
 233:     if ($lastexitcode -ne 0){
 234:         Write-Error $ErrorMsgs["ErrorRestore"]
 235:         exit 1
 236:     }
 237:  
 238:     for($i=0; $i -lt $commands.length; $i++){
 239:         Invoke-Expression $commands[$i] | out-null
 240:         Check-Error $commanderrors[$i]
 241:     }
 242:  
 243:     winrm create winrm/config/winrs/customremoteshell?uri=http://schemas.microsoft.com/wbem/wsman/1/windows/shell/Microsoft.PowerShell (fixhash @{Shell="$env:windir\system32\windowspowershell\v1.0\powershell.exe";Arguments="-s -nologo"}) | out-null
 244:     Check-Error $ErrorMsgs["ErrorCreateCustomShell"]
 245:     Write-Message "Configuring WSMan Complete"    
 246:  
 247:     #open network ports as necessary
 248:     Write-Message "Opening port 80 and port 443"
 249:     netsh firewall set portopening TCP 80 HTTP |  out-null 
 250:     Check-Error $ErrorMsgs["ErrorPort80"]
 251:     netsh firewall set portopening TCP 443 HTTPS | out-null
 252:     Check-Error $ErrorMsgs["ErrorPort443"]
 253: }
 254: else{
 255:     Write-Error "Argument $action is not supported"
 256: }
 257:  
 258:  
 259: # SIG # Begin signature block
 260: # MIIkOQYJKoZIhvcNAQcCoIIkKjCCJCYCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
 261: # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
 262: # A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xHjAcBgNVBAsTFU1pY3Jvc29mdCBDb3Jwb3Jh
 278: # dGlvbjEhMB8GA1UEAxMYTWljcm9zb2Z0IFJvb3QgQXV0aG9yaXR5gg8AwQCLPDyI
 279: # EdE+9mPs30AwDQYJKoZIhvcNAQEEBQADggEBAJXoC8CN85cYNe24ASTYdxHzXGAy
 280: # n54Lyz4FkYiPyTrmIfLwV5MstaBHyGLv/NfMOztaqTZUaf4kbT/JzKreBXzdMY09
 281: # nxBwarv+Ek8YacD80EPjEVogT+pie6+qGcgrNyUtvmWhEoolD2Oj91Qc+SHJ1hXz
 282: # UqxuQzIH/YIX+OVnbA1R9r3xUse958Qw/CAxCYgdlSkaTdUdAqXxgOADtFv0sd3I
 283: # V+5lScdSVLa0AygS/5DW8AiPfriXxas3LOR65Kh343agANBqP8HSNorgQRKoNWob
 284: # ats14dQcBOSoRQTIWjM4bk0cDWK3CqKM09VUP0bNHFWmcNsSOoeTdZ+n0qAwggQS
 285: # MIIC+qADAgECAg8AwQCLPDyIEdE+9mPs30AwDQYJKoZIhvcNAQEEBQAwcDErMCkG
 286: # A1UECxMiQ29weXJpZ2h0IChjKSAxOTk3IE1pY3Jvc29mdCBDb3JwLjEeMBwGA1UE
 287: # CxMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSEwHwYDVQQDExhNaWNyb3NvZnQgUm9v
 288: # dCBBdXRob3JpdHkwHhcNOTcwMTEwMDcwMDAwWhcNMjAxMjMxMDcwMDAwWjBwMSsw
 289: # KQYDVQQLEyJDb3B5cmlnaHQgKGMpIDE5OTcgTWljcm9zb2Z0IENvcnAuMR4wHAYD
 290: # VQQLExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xITAfBgNVBAMTGE1pY3Jvc29mdCBS
 291: # b290IEF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKkC
 292: # vcFw5jvyThson5d4XjDqoqmNJV/4/pVMo7f+naIgPnxRopuij2Aya9FCZHnurHbJ
 293: #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0OBBYEFMwdznYAcFuv8drE
 324: # TppRRC6jRGPwMAsGA1UdDwQEAwIBhjAJBgUrDgMCHQUAA4IBAQB7q65+SibyzrxO
 325: # dKJYJ3QqdbOG/atMlHgATenK6xjcacUOonzzAkPGyofM+FPMwp+9Vm/wY0SpRADu
 326: # lsia1Ry4C58ZDZTX2h6tKX3v7aZzrI/eOY49mGq8OG3SiK8j/d/p1mkJkYi9/uEA
 327: # uzTz93z5EBIuBesplpNCayhxtziP4AcNyV1ozb2AQWtmqLu3u440yvIDEHx69dLg
 328: # Qt97/uHhrP7239UNs3DWkuNPtjiifC3UPds0C2I3Ap+BaiOJ9lxjj7BauznXYIxV
 329: # hBoz9TuYoIIMol+Lsyy3oaXLq9ogtr8wGYUgFA0qvFL0QeBeMOOSKGmHwXDi86er
 330: # zoBCcnYOMIIEajCCA1KgAwIBAgIKYQ94TQAAAAAAAzANBgkqhkiG9w0BAQUFADB5
 331: # MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVk
 332: # bW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSMwIQYDVQQDExpN
 333: # aWNyb3NvZnQgQ29kZSBTaWduaW5nIFBDQTAeFw0wNzA4MjMwMDIzMTNaFw0wOTAy
 334: # MjMwMDMzMTNaMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAw
 335: # DgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24x
 336: # HjAcBgNVBAMTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjCCASIwDQYJKoZIhvcNAQEB
 337: # BQADggEPADCCAQoCggEBAKLbCo3PwsFJm82qOjStI1lr22y+ISK3lMjqrr/G1SbC
 338: # MhGLvNpdLPs2Vh4VK66PDd0Uo24oTH8WP0GsjUCxRogN2YGUrZcG0FdEdlzq8fwO
 339: # 4n90ozPL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0BAQUFADB5MQswCQYDVQQGEwJVUzETMBEG
 355: # A1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWlj
 356: # cm9zb2Z0IENvcnBvcmF0aW9uMSMwIQYDVQQDExpNaWNyb3NvZnQgVGltZXN0YW1w
 357: # aW5nIFBDQTAeFw0wNjA5MTYwMTUzMDBaFw0xMTA5MTYwMjAzMDBaMIGmMQswCQYD
 358: # VQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEe
 359: # MBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMScwJQYDVQQLEx5uQ2lwaGVy
 360: # IERTRSBFU046RDhBOS1DRkNDLTU3OUMxJzAlBgNVBAMTHk1pY3Jvc29mdCBUaW1l
 361: # c3RhbXBpbmcgU2VydmljZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
 362: # AJtt3IZR6DI7NzqWJbLPb+5htUHSGDtanXhnuvgf2QhVkoh+40FT+uwoVP612v5w
 363: # O5UnSH5DoDIvJoFK8gJ2d8jJqfiiIVh+Db0B2iTG/kQRBTU6AajqVAozLIfSfkGz
 364: # 6AnZsL7jmSWmvCXt19OO2/S3bRtJC+bTw4du7kbJf/Nt6+eDHqhTRj/KJH7mfMks
 365: # +3kUKEXATzZrUxqnhrPn/OHBn1EJ27ylu/7Khwn2tzIZvuFKUby8fKwslWqXc+py
 366: # V6Gci4bYm71L/CczwW0yrOBoGNhuOi4iQ9H5j+3xAAENZMDJo90P8cjpVMoR/9x4
 367: # KT4drFjA29+q3K5lG9OdvGcCAwEAAaOB+DCB9TAdBgNVHQ4EFgQUTxiJitLKAHjG
 368: # 7FkND/18xMEigN4wHwYDVR0jBBgwFoAUb+hOP5e5NKtLho+8nOqsO0FDxtAwRAYD
 369: # VR0fBD0wOzA5oDegNYYzaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraS9jcmwv
 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TU0WjAjBgkqhkiG9w0B
 447: # CQQxFgQUZ+mIozcaeB+1xNmSz8ufcuHI93owDQYJKoZIhvcNAQEFBQAEggEApK/2
 448: # dWS+XRdvo5DdXKVY1TdqvA1npnSNmyiDvFdIQ+rk7uf6POZqqWyTUFRQUA931A3d
 449: # O2d2ugpkDzZFiv2+2DNu80u0Tasg135g9hYOHjcb+leI0xz+EjefFplDTGbzWT0V
 450: # /lDgn27invVNGwg/TUqesQjmnqLV0X/ziNjjESMtJV4g22KZRy8+tZNmto5RAc0Z
 451: # SvlEBa/val8BNpfMlE4PBbacT4lplt6tPYkuVN7G0N+V7a0WiJU6LG9omN+z7a1r
 452: # FKsQtpYn2iKiuDp6jsFKOVAfgWXdYzZWrNzHSZuiwzuXQ+Y5gSUrGIpteDHWtAUH
 453: # hH5/h7xZ6NZilHWnag==
 454: # SIG # End signature block
Advertisements

3 Responses to “Enabling WinRM with Powershell”

  1. Kartik Maguwala Says:

    Hello,
    When try to execute
    $r = New-Runspace internalComputername -cred domain\user
    in Powershell gives me error
    The WinRM client sent a request to an HTTP server and got a response saying the requested HTTP URL was not available. This is usually returned by a HTTP server that does not support the WS-Management protocol.

    I want to know what it means and how to solve?

    I have also installed powershell 2.0 and WinRM to client machine to which i am trying to connect.

  2. Network Unidentified Says:

    Network Unidentified…

    […]Enabling WinRM with Powershell « Get-Powershell[…]…

  3. http://suppsreviewed.com/supplements/c4-extreme Says:

    Hmm is anyone else encountering problems with the images on this
    blog loading? I’m trying to figure out if its a problem on my end or if it’s the blog.
    Any suggestions would be greatly appreciated.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: