How to use Powershell to update the HTTPS cert used by WinRM?
I've reviewed the docs here, and they outline how to configure the WinRM cert via the GUI, but they don't illustrate how this would be done in Powershell.
I've reviewed the docs here, and they outline how to configure the WinRM cert via the GUI, but they don't illustrate how this would be done in Powershell.
If you've already installed the new cert, you can use the script below to configure WinRM to use the new cert.
param(
[Parameter(Mandatory=$true)]
$certThumb
)
Set-WSManInstance -ResourceURI winrm/config/Listener -SelectorSet @{Address="*"; Transport="HTTPS"} -ValueSet @{CertificateThumbprint=$certThumb}