Skip to content

Instantly share code, notes, and snippets.

@pavank
Last active April 8, 2019 13:28
Show Gist options
  • Save pavank/3176069 to your computer and use it in GitHub Desktop.
Save pavank/3176069 to your computer and use it in GitHub Desktop.
Enabling WinRM HTTPS Listener
1)Generate SSL Certificate with one of these options
-CA Authority(e.g:Versign)
-Active Directory Certificate Services
-Self Signed(Not to be used in Production)
Code : cd 'C:\Program Files (x86)\Windows Kits\8.0\bin\x64\'
makecert -r -pe -n "CN=3dmxvm-solar.cloudapp.net " -b 01/01/2012 -e 01/01/2022 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr localMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12
2) Export Certificate in .pfx format to store into Trusted Root Store of Client Machine
3) Enable WinRm Trusted Source IP addresses
Set-Item WSMan:\localhost\Client\TrustedHosts –Value "*" -Force -Concatenate
4) Enable HTTPS Listener with Certificate Thumbprint
winrm create winrm/config/Listener?Address=*+Transport=HTTPS @{Hostname="3dmxvm-solar.cloudapp.net";CertificateThumbprint="33e99c84a8986ef9121b61c7783eceef2bd37c92"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment