How to Configure Windows Server for Remote PowerShell Management (WinRM)

WinRM (Windows Remote Management) enables remote PowerShell sessions — essential for managing Server Core instances, automating multi-server tasks, and integrating with tools like Windows Admin Center.

What WinRM Enables

Remote execution of PowerShell commands/scripts on another Windows machine, as if you were working directly on that server — foundational for efficient multi-server administration and required by several other management tools.

Step 1 — Enable PowerShell Remoting

Enable-PSRemoting -Force

Configures WinRM, starts the service, and sets it to start automatically going forward.

Step 2 — Verify WinRM Is Running

Get-Service WinRM

Step 3 — Allow WinRM Through the Firewall

Enable-NetFirewallRule -Name "WINRM-HTTP-In-TCP"

Step 4 — Restrict Access to Trusted Sources

Given the significant access WinRM provides, restrict firewall rules to specific trusted management IPs rather than leaving it broadly accessible — particularly important for an internet-facing VPS.

Connecting Remotely from Another Windows Machine

Enter-PSSession -ComputerName YOUR_SERVER_IP -Credential (Get-Credential)

Running a Single Remote Command (Without an Interactive Session)

Invoke-Command -ComputerName YOUR_SERVER_IP -Credential (Get-Credential) -ScriptBlock { Get-Service }

Running Commands Against Multiple Servers Simultaneously

Invoke-Command -ComputerName server1,server2,server3 -Credential (Get-Credential) -ScriptBlock { Get-EventLog -LogName System -Newest 10 }

A powerful capability for managing many servers efficiently — run the same command across your entire fleet in one operation.

Connecting from a Non-Domain-Joined Machine

winrm quickconfig
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "YOUR_SERVER_IP"

When machines aren't part of the same Active Directory domain, you need to explicitly trust the target host for WinRM connections to work using standard authentication.

Securing WinRM with HTTPS (Recommended for Production)

winrm quickconfig -transport:https

Encrypts WinRM traffic with TLS rather than relying solely on the default HTTP transport — a meaningful security improvement, particularly important for any WinRM connections traversing the public internet.

Using WinRM with Windows Admin Center

See How to Install and Use Windows Admin Center — WinRM is the underlying mechanism enabling Windows Admin Center to manage remote servers; a properly configured WinRM setup is a prerequisite for adding remote server connections there.

Common Errors

"WinRM cannot process the request" / connection refused — verify the WinRM service is running, the firewall rule is enabled, and (for non-domain scenarios) the target is added to the client's TrustedHosts list.

Continue Reading

Browse more articles in Windows Server Administration.

  • winrm configuration, powershell remoting windows, enable-psremoting, windows remote management
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Connect to a Windows VPS via Remote Desktop (RDP)

Remote Desktop Protocol (RDP) provides full graphical access to a Windows Server VPS, letting you...

How to Secure RDP on a Windows VPS

RDP's default configuration (standard port, password authentication, unlimited login attempts)...

How to Create a New Administrator User on Windows Server

Using only the built-in Administrator account for all management tasks is risky. Creating a...

How to Install Windows Updates on a Windows VPS

Keeping Windows Server updated is essential for security and stability. This guide covers...

How to Configure Windows Firewall on a Windows VPS

Windows Defender Firewall controls which network connections are allowed to and from your server....