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

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: c/o