From f42905a9ccbf62bd3d0e2b4ffc760a90d5bd37b0 Mon Sep 17 00:00:00 2001 From: Craig Ackerman Date: Thu, 19 Jun 2014 16:59:57 +0000 Subject: [PATCH] Added commands to allow Windows firewall access to WinRM HTTPS listener --- docsite/rst/intro_windows.rst | 7 +++++++ examples/scripts/upgrade_to_ps3.ps1 | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docsite/rst/intro_windows.rst b/docsite/rst/intro_windows.rst index 562ea829569..645ea98c750 100644 --- a/docsite/rst/intro_windows.rst +++ b/docsite/rst/intro_windows.rst @@ -101,6 +101,13 @@ Alternatively, a self-signed SSL certificate can be generated in powershell usin $ winrm create winrm/config/Listener?Address=*+Transport=HTTPS  @{Hostname="host_name";CertificateThumbprint="certificate_thumbprint"} # Delete the http listener $ WinRM delete winrm/config/listener?Address=*+Transport=HTTP + +Again, if your Windows firewall is enabled, you must also run the following command to allow firewall access to the public firewall profile: + + .. code-block:: bash + + # Windows 2008 / 2008R2 / 2012 / 2012R2 + $ netsh advfirewall firewall add rule name="Allow WinRM HTTPS" dir=in localport=5986 protocol=TCP action=allow It's time to verify things are working:: diff --git a/examples/scripts/upgrade_to_ps3.ps1 b/examples/scripts/upgrade_to_ps3.ps1 index 794da55bd56..f9cbb2de485 100644 --- a/examples/scripts/upgrade_to_ps3.ps1 +++ b/examples/scripts/upgrade_to_ps3.ps1 @@ -17,7 +17,6 @@ # 6.2 is 2012 # 6.3 is 2012 R2 -Start-Transcript "C:\powershell\scriptlog.txt" if ($PSVersionTable.psversion.Major -ge 3) { @@ -33,6 +32,7 @@ function download-file $client = new-object system.net.WebClient $client.Headers.Add("user-agent", "PowerShell") $client.downloadfile($path, $local) + write-host "file downloaded successfully" } if (!(test-path $powershellpath)) @@ -78,5 +78,5 @@ else $FileName = $DownLoadUrl.Split('/')[-1] download-file $downloadurl "$powershellpath\$filename" -Stop-Transcript + ."$powershellpath\$filename" /quiet /log "C:\powershell\install.log"