TestimoX

API Reference

Class

WinRmListenerWriter

Namespace ComputerX.SecurityPolicy
Assembly ComputerX
Modifiers static

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: CreateResult

Ensures 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 requiredposition: 0
Target host or null for local.
certificateThumbprint System.String requiredposition: 1
Certificate SHA‑1 thumbprint (no spaces required).
hostname System.String = null optionalposition: 2
Optional hostname to bind.
address System.String = "*" optionalposition: 3
Listener address (default '*').
port System.Int32 = 5986 optionalposition: 4
Listener port (default 5986).
restartService System.Boolean = false optionalposition: 5
When true, attempts to restart WinRM after creation/update.

Returns

CreateResult with listener GUID and a note.