Troubleshooting ‘Access is denied’ when trying to run Enable-PSRemoting

I recently had to trouble shoot why I was getting an “Access denied error” when trying to enable PSRemoting on hosted version of Windows 2008 R2.

The error received looked something like:

WinRM Quick Configuration Running command "Set-WSManQuickConfig" to enable
this machine for remote management through WinRM service
This includes:
    1. Starting or restarting (if already started) the WinRM service
    2. Setting the WinRM service type to auto start
    3. Creating a listener to accept requests on any IP address
    4. Enabling firewall exception for WS-Management traffic (for http only).

Access is denied. + CategoryInfo : InvalidOperation: (:) [Set-WSManQuickConfig],
InvalidOperationException + FullyQualifiedErrorId : 

I discovered that my hosting company had applied a group policy on a firewall rule, which is modified in the 4th step when trying to enabled PSRemoting:
4. Enabling firewall exception for WS-Management traffic (for http only)

Steps to fix:
1) Click on start menu
 » Administrative tools
 » Windows Firewall and Advanced security

2) Click on inbound rules
 » New rule
 » choose the option “predefined” and select Windows Remote Management from the dropdown list
 » Click next

3) Now, Deselect Windows Remote Management compatibility Mode(HTTP-In) and select Windows Remote Management Mode(HTTP-In)
 » Click Next
 » Allow the connection
 » Finish

Trouble Shooting References:
Here’s a list of useful resources for debugging this, which I used before I discovered the above fix.

Check that your account is in the Local Administrators group: powershell> whoami /all
Powershell team - Enable PSRemoting (4 common trouble shooting steps)
How to run powershell commands on remote computers (Domain vs Workgroup setup)

Other Topics:
Trying to setup PSRemoting on SharePoint?
Using PowerShell remoting technologies to manage a SharePoint farm

Trying to setup PSRemoting on Windows XP?
Error enabling PSRemoting in Windows XP SP3

Are you setting up PSRemoting on a non English computer? - change it to English
Reference 1 - lanuage not specified
Reference 2 - Spanish/German

Are you using VirtualBox and trying to setup PSRemoting?
Virtualbox and needing to enable enable CredSSP
VirtualBox and setting up PSRemoting gets access denied error

Originally Answered on:
Unable to enable Powershell Remoting
Powershell enable-psremoting for remote machine

Server Fault
Enabling Powershell Remoting, Access is denied?
Enable-PSRemoting on Windows Server 2008 R2 error

Originally posted on: