Difference between revisions of "Winrm enable https 5986"

From UVOO Tech Wiki
Jump to navigation Jump to search
(Created page with "``` $HN="myhost.example.com"; $TP=(Get-ChildItem -Path Cert:LocalMachine\MY | where Subject -like "CN=${HN}*").Thumbprint winrm create winrm/config/Listener?Address=*+Transpor...")
 
Line 3: Line 3:
 
$TP=(Get-ChildItem -Path Cert:LocalMachine\MY | where Subject -like "CN=${HN}*").Thumbprint
 
$TP=(Get-ChildItem -Path Cert:LocalMachine\MY | where Subject -like "CN=${HN}*").Thumbprint
 
winrm create winrm/config/Listener?Address=*+Transport=HTTPS "@{Hostname=`"${HN}`"; CertificateThumbprint=`"$TP`"}"
 
winrm create winrm/config/Listener?Address=*+Transport=HTTPS "@{Hostname=`"${HN}`"; CertificateThumbprint=`"$TP`"}"
 +
```
 +
 +
May not work
 +
```
 +
winrm quickconfig -transport:https -force
 
```
 
```

Revision as of 01:29, 7 November 2023

$HN="myhost.example.com";
$TP=(Get-ChildItem -Path Cert:LocalMachine\MY | where Subject -like "CN=${HN}*").Thumbprint
winrm create winrm/config/Listener?Address=*+Transport=HTTPS "@{Hostname=`"${HN}`"; CertificateThumbprint=`"$TP`"}"

May not work

winrm quickconfig -transport:https -force