• Comments 8

I installed Win7 RC build yesterday and tried to enable PS Remoting. I launched PowerShell elevated, ran Enable-PsRemoting cmdlet but it gave an “access denied” error message 

PS C:\Windows\system32> Enable-PSRemoting -force
WinRM already is set up to receive requests on this machine.
Set-WSManQuickConfig : Access is denied.
At line:50 char:33
+             Set-WSManQuickConfig <<<<  -force
    + CategoryInfo          : InvalidOperation: (:) [Set-WSManQuickConfig], InvalidOperationException
    + FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.SetWSManQuickConfigCommand

One good thing in PowerShell help in RC is “about_Remote_Troubleshooting”. It is very detailed and covers all important failure scenarios. Go through it if you face problem with enabling remoting on a box

To summarize, there are few things that I had to check

1.      My machine is connected to domain.

2.      I am logged in as administrator

3.      PowerShell is launched elevated.

4.      My password is not blank

Problem was that my domain a/c was not an administrator on the box. Even if I launch PowerShell elevated (and give local administrator creds) it was not working. I tried logging in as local admin but Enable-PS Remoting still failed.

Solution: I had to add my domain a/c to administrators group and Enable-PsSession worked after that.

 If you are not an administrator, Enable-PsSession will fail even if you launch elevated. This is true for some other remoting configuration cmdlets as well e.g.

 Set-PSSessionConfiguration Microsoft.Powershell -ShowSecurityDescriptorUI

Another important thing to know is – “You must run PowerShell elevated if you’re connecting to the same box (localhost)”.

Osama Sajid



Leave a Comment
  • Please add 7 and 5 and type the answer here:
  • Post
  • PingBack from http://www.alvinashcraft.com/2009/05/01/dew-drop-may-1-2009/

  • This looks like a process that cries out for a Group Policy setting.

  • Thanks for the tips - I plan to install the RC on my laptop soon and this is a great heads up.

    Further to Jeffrey's suggestion, I think this cries out for an installer that does things "right". In my view, the installation of WinRM should be seamless.

    I'm unclear on why logging in as local admin did not work, but logging in as a domain user added to the local administrator's group did. Surely the local admin rights in both cases is the same? Or is this some deliberate bit of coding that specifically checks that if the machine is domain joined, then you must logged on with a domain account (and that account must be in the local admin's group)??

  • RE @Jeffery Hicks .. there is already a group policy to enable remoting through GP.

  • Can you provide some more information on the group policy settings to enable (powershell) remoting?

  • I too am interested in the GPO way to deploy Powershell remoting.. I can see the setting for (what I presume to be) the equivalent of winrm quickconfig, what else needs to be set so that powershell remoting is enabled?

  • This worked a treat, thanks!

  • I had the same problem. Joining to the domain and set-up a administrator password was the solution for me. Thanks for the information!

Page 1 of 1 (8 items)