Update windows_winrm.rst (#2721)

Fix WinRM HTTPS Listener creation.
This commit is contained in:
Christoph Obst
2025-06-17 17:09:05 +02:00
committed by GitHub
parent 1a86c51730
commit 59e3a8d968

View File

@@ -187,20 +187,20 @@ Creating a HTTP listener can be done through the ``Enable-PSRemoting`` cmdlet bu
}
New-WSManInstance @listenerParams
Creating a HTTPS listener is similar but the ``Port`` is now ``5985`` and the ``CertificateThumbprint`` value must be set. The certificate can either be a self signed certificate or a certificate from a certificate authority. How to generate a certificate is outside the scope of this section.
Creating a HTTPS listener is similar but the ``Port`` is now ``5986`` and the ``CertificateThumbprint`` value must be set. The certificate can either be a self signed certificate or a certificate from a certificate authority. How to generate a certificate is outside the scope of this section.
.. code-block:: powershell
$listenerParams = @{
ResourceURI = 'winrm/config/listener'
SelectorSet = @{
Transport = "HTTP"
Transport = "HTTPS"
Address = "*"
}
ValueSet = @{
CertificateThumbprint = 'E6CDAA82EEAF2ECE8546E05DB7F3E01AA47D76CE'
Enabled = $true
Port = 5985
Port = 5986
}
}
New-WSManInstance @listenerParams