Skip to content
February 27, 2026 • Mid-Level (3-5 years) How-To

PowerShell Remoting Troubleshooting Guide

By Last updated

Fix PowerShell Remoting (WinRM) connection issues. Get remote PS sessions working across your network.

Free PDF

Top 10 Intune and Autopilot Enrollment Errors: Causes and Fixes

A free cheat sheet covering ten enrollment errors, each with the symptom, the most likely cause, the fix, and a link to the full guide.

  • Ten real error codes and failures, including 0x80180014, 0x8018002b, 0x801c03f3, 0x800705b4, the ODJConnector logon failure, and the Win32 detection error 0x87d1041c.
  • Every cause and fix checked against Microsoft's own documentation.
  • A link from each entry to the full zakitpro.com article.

You get the free PDF. By subscribing you also agree to receive occasional emails from zakitpro about Intune and Autopilot troubleshooting. Emails are sent through MailerLite. You can unsubscribe anytime with the link in every email. See the privacy page for how your email is handled.

Step-by-step guide

PowerShell Remoting Troubleshooting Guide

PowerShell Remoting is essential for remote management, but getting it working can be painful. This guide fixes the most common issues.

The Problem

You try:

Enter-PSSession -ComputerName SERVER01

And get one of these errors:

  • “WinRM cannot process the request”
  • “Access is denied”
  • “The client cannot connect to the destination”
  • “The remote server returned an error”

Fix #1: Enable WinRM Service

# On the REMOTE computer, run as Admin:
Start-Service WinRM
Set-Service -Name WinRM -StartupType Automatic

Fix #2: Quick Config Script

Microsoft provides a one-liner:

# Run on remote computer as Admin
Enable-PSRemoting -Force

This:

  • Starts WinRM service
  • Creates firewall rules
  • Enables HTTP listener

Fix #3: Check WinRM Service Status

# On remote computer
Get-Service WinRM
WinRM enumerate winrm/config/listener

Should show a listener on port 5985 (HTTP) or 5986 (HTTPS).

Fix #4: Firewall Rules

# Check firewall
Get-NetFirewallRule -Name "*WinRM*" | Select-Object Name, Enabled

# Enable via PowerShell
Enable-NetFirewallRule -Name "Windows Remote Management (HTTP-In)"

Fix #5: Certificate Issues (HTTPS)

If using HTTPS (recommended):

# Check existing certificate
Get-ChildItem Cert:\LocalMachine\My | Where-Object { $_.Subject -like "*$env:COMPUTERNAME*" }

# Configure HTTPS only by following Microsoft's WinRM HTTPS procedure. It
# requires a suitable certificate, private key, matching hostname, and scoped
# firewall rule; don't create a broad listener as a connectivity shortcut.

Fix #6: Permission Issues

# Check user is in Remote Management Users
Get-LocalGroupMember -Group "Remote Management Users"

# Add user if missing
Add-LocalGroupMember -Group "Remote Management Users" -Member "DOMAIN\User"

Fix #7: TrustedHosts (For Non-Domain)

If not using Kerberos:

# On CLIENT computer
# Inspect the current list. If Kerberos cannot be used, add only specifically
# approved hosts; TrustedHosts affects all users of this client and does not
# independently verify the server's identity.
Get-Item WSMan:\localhost\Client\TrustedHosts
# If required, append one reviewed host using your change process.
# Set-Item WSMan:\localhost\Client\TrustedHosts -Value 'SERVER01.contoso.com'

Fix #8: Check Network Connectivity

# Test basic connectivity
Test-NetConnection -ComputerName SERVER01 -Port 5985
Test-NetConnection -ComputerName SERVER01 -Port 5986

# Test with specific auth
Test-WSMan -ComputerName SERVER01

Fix #9: Credential Issues

# Use explicit credentials
$Cred = Get-Credential
Enter-PSSession -ComputerName SERVER01 -Credential $Cred

# Avoid enabling CredSSP as a generic double-hop fix. It delegates credentials
# to the remote host; use a reviewed, narrowly scoped second-hop design.

Fix #10: Group Policy Block

Check if GPO blocks WinRM:

# Check local policy
gpedit.msc → Computer Configuration → Administrative Templates → Windows Components → Windows Remote Management

# Check domain policy
gpresult /r | Select-String "WinRM"

Quick Diagnostic Script

# Run on the PROBLEM computer
Write-Host "=== WinRM Status ==="
Get-Service WinRM | Select-Object Name, Status, StartType

Write-Host "`n=== Listeners ==="
Get-ChildItem WSMan:\localhost\Listener | Select-Object Name, Value

Write-Host "`n=== Firewall ==="
Get-NetFirewallRule -Name "*WinRM*" | Where-Object { $_.Enabled } | Select-Object Name

Write-Host "`n=== TrustedHosts ==="
Get-Item WSMan:\localhost\TrustedHosts

For domain-joined computers, prefer connecting by hostname with Kerberos. Microsoft's [remoting troubleshooting guide](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_remote_troubleshooting) explains when HTTPS or a specific TrustedHosts entry is needed. See also [WinRM security considerations](https://learn.microsoft.com/en-us/powershell/scripting/security/remoting/winrm-security?view=powershell-7.6).

Wrap-Up

Most WinRM issues come down to: service not running, firewall blocking, or permissions. Start with the basics and work up.

Need help? Leave a comment!

Free PDF

Top 10 Intune and Autopilot Enrollment Errors: Causes and Fixes

A free cheat sheet covering ten enrollment errors, each with the symptom, the most likely cause, the fix, and a link to the full guide.

  • Ten real error codes and failures, including 0x80180014, 0x8018002b, 0x801c03f3, 0x800705b4, the ODJConnector logon failure, and the Win32 detection error 0x87d1041c.
  • Every cause and fix checked against Microsoft's own documentation.
  • A link from each entry to the full zakitpro.com article.

You get the free PDF. By subscribing you also agree to receive occasional emails from zakitpro about Intune and Autopilot troubleshooting. Emails are sent through MailerLite. You can unsubscribe anytime with the link in every email. See the privacy page for how your email is handled.

#powershell #winrm #remote #troubleshooting #pssession