On this page

PowerShell Remoting Security: Best Practices Guide

Updated on June 18, 2026

Enrico Hochkoeppler Profile

By Enrico Hochkoeppler

Web Developer & TutoriaLibre Founder

PowerShell Remoting is the recommended way to manage Windows systems and is enabled by default in Windows Server 2012 R2 and later. A secure remoting implementation requires strong authentication (preferably Kerberos), encryption of all communication, proper authorization through group membership and session configurations, careful handling of multi-hop scenarios, comprehensive logging and auditing, and thoughtful firewall and network design. When these principles are applied, PowerShell Remoting becomes a secure and reliable foundation for large-scale remote administration.


The Security Model Behind WinRM​

WinRM enforces a strict security model based on three pillars:

PowerShell Remoting does not bypass Windows security; instead, it integrates with it. Every remote command runs under the security context of the authenticated user, and the remote system enforces the same permissions that would apply if the user were logged in locally.

WinRM runs as a service under the Network Service account and spawns isolated processes running as user accounts to host PowerShell instances. An instance of PowerShell running as one user has no access to a process running an instance of PowerShell as another user, providing process-level isolation.


Authentication Methods​

WinRM supports several authentication mechanisms, each suited to different environments.

Kerberos (Default in Domain Environments)​

Kerberos is the preferred authentication method because:

When both machines are domain-joined, Kerberos is used automatically.

NTLM (Fallback When Kerberos Is Unavailable)​

NTLM is used when machines are not domain-joined or when Kerberos cannot be negotiated. NTLM is secure but lacks mutual authentication and is more limited in multi-hop scenarios.

CredSSP (For Multi-Hop Authentication)​

CredSSP allows credentials to be delegated to a remote machine so that the remote session can authenticate to a third system. This is useful but must be enabled carefully because it increases the risk of credential exposure if the remote machine is compromised.

Basic Authentication (Only Over HTTPS)​

Basic authentication sends credentials in a reversible form and must never be used without HTTPS. It is typically reserved for legacy systems or constrained environments.


Encryption of Remote Sessions​

It is helpful to consider the security of a PowerShell Remoting connection from two perspectives: initial authentication and ongoing communication. Regardless of the transport protocol used (HTTP or HTTPS), WinRM always encrypts all PowerShell remoting communication after initial authentication.

Even when using HTTP (port 5985), PowerShell Remoting encrypts all traffic using the session key negotiated during authentication. This means:

However, encryption alone does not guarantee identity verification. For environments requiring strict identity assurance, HTTPS (port 5986) should be used.

Encryption Details by Authentication Method​

When you connect over HTTPS, WinRM uses the TLS protocol to negotiate the encryption used to transport data. When you connect over HTTP, WinRM uses the message-level encryption negotiated by the initial authentication protocol.


Using HTTPS for Enhanced Security​

Configuring WinRM to use HTTPS provides:

HTTPS remoting requires:

Once configured, the remoting experience is identical, but the connection is more secure.

NTLM-Based Server Identity​

Assigning an SSL certificate to the target server (if issued by a Certificate Authority that the client also trusts) enables NTLM-based authentication that guarantees both the user identity and server identity.

If deploying an SSL certificate to a server for NTLM connections is infeasible, you can suppress the resulting identity errors by adding the server to the WinRM TrustedHosts list. Adding a server name to the TrustedHosts list should not be considered as any form of statement of the trustworthiness of the hosts themselves—as the NTLM authentication protocol cannot guarantee that you are in fact connecting to the host you are intending to connect to. Instead, consider the TrustedHosts setting to be the list of hosts for which you wish to suppress the error generated by being unable to verify the server's identity.


Authorization and Access Control​

Authentication determines who the user is; authorization determines what they can do.

Local Group Membership​

Users must be members of the Administrators group (full access) or the Remote Management Users group (limited access). Membership in these groups determines whether a user can establish a remote session.

Session Configuration Permissions​

Each remoting endpoint has an associated security descriptor that defines:

This allows administrators to create highly restricted environments, limiting users to specific tasks.


The Role of Session Configurations in Security​

Session configurations (endpoints) are a critical security boundary. They allow administrators to:

This mechanism is the foundation of Just Enough Administration (JEA), which provides role-based, least-privilege remote access. JEA enables you to remove users from widely privileged local or domain administrator roles and carefully control what they can do on each machine.

Securing Restricted Sessions​

For restricted sessions, follow these recommendations:


The Double-Hop Problem​

When a remote session attempts to access a third system, authentication may fail because the remote machine cannot reuse the user's credentials. This is known as the double-hop problem.

By default, PowerShell Remoting uses Kerberos (if available) or NTLM for authentication. Both of these protocols authenticate to the remote machine without sending credentials to it. This is the most secure way to authenticate, but because the remote machine does not have the user's credentials, it cannot access other computers and services on the user's behalf.

Solutions to the Double-Hop Problem​

The following table lists the methods in order of preference:

ConfigurationNoteResource-based Kerberos constrained delegationHigher security with simpler configurationKerberos constrained delegationHigh security but requires Domain AdministratorJust Enough Administration (JEA)Can provide the best security but requires more detailed configurationPSSessionConfiguration using RunAsSimpler to configure but requires credential managementCredSSPBalances ease of use and securityPass credentials inside an Invoke-Command script blockSimplest to use but you must provide credentials**Kerberos delegation (unconstrained)**Not recommended

CredSSP Considerations​

CredSSP caches credentials on the remote server, so using it opens you up to credential theft attacks. If the remote computer is compromised, the attacker has access to the user's credentials. CredSSP is disabled by default on both client and server computers. You should enable CredSSP only in the most trusted environments.

Resource-Based Kerberos Constrained Delegation​

For resource-based Kerberos constrained delegation, WinRM (and therefore PowerShell remoting) runs as the computer account by default. To allow delegation, set the PrincipalsAllowedToDelegateToAccount parameter on the target server to the computer object of the intermediate server.

The Kerberos Key Distribution Center (KDC) caches denied-access attempts for 15 minutes. If the intermediate server previously attempted to access the target server, you need to clear the cache.


Logging and Auditing​

PowerShell Remoting integrates with Windows logging systems, providing visibility into remote activity.

Important Event Logs​

Researchers from Mandiant presented a session at the BlackHat conference that provides a good summary of the event logs and other security evidence generated by PowerShell Remoting sessions.

These logs allow administrators to:


Firewall and Network Considerations​

WinRM uses:

Firewalls must be configured to allow inbound traffic on these ports. In tightly controlled environments, administrators often restrict access to specific management subnets or require VPN connections.

Firewall Rules by Network Type​

On private networks, the default Windows Firewall rule for PowerShell Remoting accepts all connections. On public networks, the default Windows Firewall rule allows PowerShell Remoting connections only from within the same subnet. You have to explicitly change that rule to open PowerShell Remoting to all connections on a public network.

Warning: The firewall rule for public networks is meant to protect the computer from potentially malicious external connection attempts. Use caution when removing this rule.


Summary​

Security is an integral part of PowerShell Remoting. A secure remoting environment requires:

When these principles are applied, PowerShell Remoting becomes a secure and reliable foundation for large-scale remote administration.

Found this helpful? Share the knowledge...

... or support this project to keep it alive!

Buy Me a Coffee

Previous

Sessions and Session Configuration

Next

Managing Windows Systems