API Reference
Class
WinRmListenerWriter
Creates or updates WinRM HTTPS listeners by writing WSMAN registry keys. Requires administrative rights.
Inheritance
- Object
- WinRmListenerWriter
Methods
public static CreateResult EnsureHttpsListener(String computerName, String certificateThumbprint, String hostname = null, String address = "*", Int32 port = 5986, Boolean restartService = false) #Returns:
CreateResultEnsures there is an HTTPS WinRM listener using the specified certificate thumbprint and optional hostname/address/port. Updates the thumbprint when a matching listener exists.
Parameters
- computerName System.String
- Target host or null for local.
- certificateThumbprint System.String
- Certificate SHA‑1 thumbprint (no spaces required).
- hostname System.String = null
- Optional hostname to bind.
- address System.String = "*"
- Listener address (default '*').
- port System.Int32 = 5986
- Listener port (default 5986).
- restartService System.Boolean = false
- When true, attempts to restart WinRM after creation/update.
Returns
CreateResult with listener GUID and a note.
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object