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:
1 2 3 4 5 6 7 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).
1 2 3 Access is denied. + CategoryInfo : InvalidOperation: (:) [Set-WSManQuickConfig], InvalidOperationException + FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.SetWSManQuickConfigCommand
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
Here’s a list of useful resources for debugging this, which I used before I discovered the above fix:
Trouble Shooting References:
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)
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 using VirtualBox and trying to setup PSRemoting?
Virtualbox and needing to enable enable CredSSP
VirtualBox and setting up PSRemoting gets access denied error
Originally posted on http://geekswithblogs.net/rwillgoss/archive/2014/01/19/155231.aspx