Join our Newsletter — 33% off our NHI Course
Home› Guides› Windows Remote Management for Beginners: How Admins Run…
Guide Endpoint Security

Windows Remote Management for Beginners: How Admins Run Commands on Other PCs

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 30 November 2026 10 min read
On this page

Windows Remote Management (WinRM) is a built-in Windows service that lets admins run commands on other computers over the network.

This guide is for new IT staff, help desk teams and anyone curious about how Windows machines are managed from afar. You do not need to write scripts to follow it.

In short

  • WinRM is how PowerShell reaches other Windows computers to run commands on them.
  • It listens on network ports 5985 and 5986, and on servers it is often switched on already.
  • Anyone with the right account can use it, so attackers who steal an admin account can use it too.
  • Limit who can connect, keep traffic on trusted networks and watch the logs.

What you will learn

  • Explain what WinRM and WMI do and how they relate.
  • Describe which ports and accounts WinRM uses.
  • Spot why attackers like built-in admin tools.
  • Take simple steps to limit and watch remote admin access.
Remote control channel (WinRM)
the Windows service that carries commands from one computer to another.
Listener
the part of WinRM that waits on a network port for incoming requests.
Management data (WMI)
the Windows feature that reports and changes system settings, which WinRM can reach remotely.

What is Windows Remote Management?

Think of a building manager with a master intercom. From one desk, they can ask any room to switch on the heating or report its temperature. Nobody has to walk round the building.

WinRM is that intercom for Windows. It is Microsoft's version of a standard called WS-Management, and PowerShell remoting uses it to run commands on remote computers [1]. It comes installed with all currently supported versions of Windows [2].

A close cousin is WMI (Windows Management Instrumentation), the part of Windows that holds management data and actions. WMI can be reached remotely over WinRM, or over an older route called DCOM [4].

Where the comparison stops working: an intercom only passes messages. WinRM can run real programs, change settings and read files, with the full rights of whoever is signed in.

Why does it matter?

WinRM saves admins a great deal of time. The same power makes it useful to an intruder who has stolen an admin account.

If you work on the help desk

What could happen: a stolen help desk account is used to run commands on many PCs at once.

Check this: ask whether your everyday account can connect to other machines remotely.

Next: Lateral Movement for Beginners

If you look after servers

What could happen: remote management is left open to every network, not just the admin network.

Check this: find out which networks can reach ports 5985 and 5986 on your servers.

Next: PowerShell Security for Beginners

If you are new to security monitoring

What could happen: remote commands look like normal admin work, so nobody notices them.

Check this: ask whether remote PowerShell sessions are logged and reviewed.

Next: PowerShell Logging Detection Guide

What does it look like?

Here is a made-up summary of the WinRM settings on one server. It shows the kind of lines worth checking.

Example only. All values are made up.

Host:              EXAMPLE-SRV-0000.example.invalid
Listener:          HTTP  port 5985  address *        (1)
Listener:          HTTPS port 5986  (not set up)     (2)
AllowUnencrypted:  false                             (3)
Basic auth:        false                             (4)
TrustedHosts:      *                                 (5)
Who may connect:   Administrators, FAKE-helpdesk     (6)
  1. An HTTP listener on any address. In a real file, this line would show the address and port the server listens on.
  2. No HTTPS listener has been set up yet.
  3. Unencrypted traffic is off, which matches the default.
  4. Basic sign-in sends the name and password in clear text, so it is off.
  5. A star means "skip the server identity check for every host". That setting is too broad.
  6. In a real file, this line would list the groups allowed to open a remote session.

Why this is risky: a wide TrustedHosts list and an extra group with remote rights give an intruder more ways in.

The safer way: keep TrustedHosts as short as possible and give remote rights only to the admins who need them.

How does it work?

  1. A listener waits for requests. No listener exists by default, even when the service is running. The setup command creates one and opens the firewall ports [2].
  2. The request arrives on a port. WinRM uses port 5985 for HTTP and 5986 for HTTPS [1].
  3. The admin proves who they are. In a domain, Kerberos is the default and checks both the user and the server. NTLM checks only the user [1].
  4. The traffic is encrypted. After sign-in, WinRM encrypts all remoting traffic, even over HTTP [1].
  5. The command runs as that user. WinRM starts a separate process under the user's account, so the user's normal rights apply [1].
Diagram titled How a remote command travels with WinRM. Four boxes in a row joined by arrows. Box 1, Admin PC: the admin types a PowerShell command. Box 2, Network: the request goes to port 5985 or 5986. Box 3, Sign-in check: Kerberos or NTLM proves who the admin is. Box 4, Target PC: the command runs with the admin's own rights. A note underneath says a stolen admin account can travel the same path, so limit who can connect and log every session.
Figure 1. A remote command goes from the admin's PC, through a sign-in check, to run on the target PC.

On Windows Server 2012 R2 and later, PowerShell remoting is switched on by default [1]. By default, only members of the Administrators group can connect [1].

Attackers who hold a valid account can use WinRM to act on a remote system as that user. MITRE ATT&CK, a public list of attacker behaviour, records this as a way to move between machines [3]. It records WMI abuse too [4].

A worked example

This story is made up to show the idea.

Farah Ulrich runs IT for a small accounts firm with twelve servers. She uses PowerShell remoting every day to install updates without visiting each machine.

A new security partner, Yara Achterberg, asks her a simple question. Which accounts and networks can reach WinRM on those servers?

Farah checks. The servers accept remote sessions from any office network, including the guest wifi. Two old help desk accounts are in the Administrators group. One belongs to someone who left last year.

Yara explains the risk. If anyone steals one of those accounts, they can run commands on every server in the same way Farah does. The activity would look like normal admin work.

Farah makes three changes. She removes the old accounts. She limits the firewall rule so only the admin network can reach ports 5985 and 5986. She turns on PowerShell logging and sends the logs to the firm's monitoring tool.

A month later, the logs show a remote session at 3am. It turns out to be a planned update script, but now Farah can see it and check it.

Farah learned that WinRM itself was not the problem. Who could use it, and from where, was what needed fixing.

Myths and mistakes

What people thinkWhat is true
WinRM over HTTP sends everything in plain text.After sign-in, WinRM encrypts all remoting traffic, even over HTTP [1].
Adding a server to TrustedHosts means it is safe.It only tells Windows to skip checking that server's identity [1].
WinRM is only on if someone turned it on.PowerShell remoting is on by default on Windows Server 2012 R2 and later [1].
Basic sign-in is fine on an internal network.Basic sends the user name and password in clear text and is the weakest option [2].
Turning WinRM off everywhere is the safest fix.Admins still need a way to manage servers. Limiting and logging WinRM keeps that work visible.

What can I do this week?

  • List the groups that can open remote sessions on one important server.
  • Check which networks can reach ports 5985 and 5986.
  • Ask whether PowerShell activity is logged and who reads the logs.
  • Read Lateral Movement for Beginners to see how attackers move between machines.

Checklist

  • I can explain WinRM as the channel PowerShell uses to reach other Windows PCs.
  • I know WinRM uses ports 5985 and 5986.
  • I know remote commands run with the rights of the signed-in account.
  • Only the admins who need it can open remote sessions.
  • Remote management ports are reachable only from admin networks.
  • Basic sign-in and unencrypted traffic stay switched off.
  • TrustedHosts is kept short, with no wildcard.
  • Remote sessions are logged and someone reviews them.

Common questions

What is the difference between WinRM and PowerShell remoting?

WinRM is the Windows service and protocol that carries the traffic. PowerShell remoting is the feature that uses WinRM to run PowerShell commands on another computer. Other tools, such as Windows Remote Shell and event forwarding, also depend on WinRM being set up.

What is the difference between WinRM and WMI?

WMI is the part of Windows that holds management data and actions, such as listing services. WinRM is one way to reach WMI from another computer. The older route is DCOM, which uses port 135. Attackers can abuse either route with a stolen account.

Should I use HTTP or HTTPS for WinRM?

Traffic is encrypted after sign-in either way. HTTPS adds a certificate that proves the server's identity, which helps when Kerberos is not available, such as outside a domain. It needs a certificate and port 5986 open.

Do attackers really use WinRM?

Yes. MITRE ATT&CK lists WinRM as a way attackers use valid accounts to act on remote systems. It is attractive because it is built in and looks like normal admin work, so logging and limiting access matter.

Who can use WinRM by default?

By default, PowerShell remoting only accepts connections from members of the local Administrators group. Admins can add other groups, which is why it is worth checking who has been given remote rights over time.

Where next?

Ready for the detail? Read the practitioner guide: Windows Remote Management and WinRM/PowerShell Remoting Security Guide. It covers hardening, Just Enough Administration and logging in depth.

Also useful:

Related NHI Mgmt Group resources: PowerShell Logging Detection Guide, RSAT security and Endpoint Security Guide.

Key terms

WinRM
Windows Remote Management, Microsoft's service and protocol for running commands and managing systems over the network.
PowerShell Remoting
Using remote PowerShell sessions, carried by WinRM, to administer Windows systems over the network.
WMI
Windows Management Instrumentation, the Windows interface for management data and remote administration.
Kerberos
A ticket-based sign-in protocol that proves identity without sending passwords over the network.
NTLM
An older Microsoft challenge-response sign-in protocol that proves the user's identity but not the server's.
Lateral movement
The ways an attacker moves from a first foothold to other systems, often reusing stolen accounts.

Sources and further reading

  1. Microsoft, "Security considerations for PowerShell Remoting using WinRM", Microsoft Learn. https://learn.microsoft.com/en-us/powershell/scripting/security/remoting/winrm-security (accessed 30 Nov 2026).
  2. Microsoft, "Installation and configuration for Windows Remote Management", Microsoft Learn. https://learn.microsoft.com/en-us/windows/win32/winrm/installation-and-configuration-for-windows-remote-management (accessed 30 Nov 2026).
  3. MITRE, "Remote Services: Windows Remote Management (T1021.006)", ATT&CK v20. https://attack.mitre.org/techniques/T1021/006/ (accessed 30 Nov 2026).
  4. MITRE, "Windows Management Instrumentation (T1047)", ATT&CK v20. https://attack.mitre.org/techniques/T1047/ (accessed 30 Nov 2026).

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.