Reputation: 1232
I'm running powershell 3.0 in Windows 7 and I'm connected to a domain.
These are the logs I get when I run Enable-PSRemoting:
WinRM has been updated to receive requests.
WinRM service type changed successfully.
Set-WSManQuickConfig : <f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2"
Machine="localhost"><f:Message><f:ProviderFault provider="Config provider" path="%systemroot%\system32\WsmSvc.dll"><f:WSManFault
xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2" Machine="mycomputername.mydomainname"><f:Message>Unable to check the sta
the firewall. </f:Message></f:WSManFault></f:ProviderFault></f:Message></f:WSManFault>
At line:1 char:1
+ Set-WSManQuickConfig
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Set-WSManQuickConfig], InvalidOperationException
+ FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.SetWSManQuickConfigCommand
Upvotes: 3
Views: 4491
Reputation: 2184
In my case I had to add both "normal" rules as well as "compatiblity" rules:
Windows Remote Management - Compatibility Mode (HTTP-In)
Windows Remote Management (HTTP-In)
This are 4 rules in total.
Next step is to set Remote Address
fields to Any
for Public profile rules.
That did the trick, I can now modify all WinRM
settings.
If the effect is not immediate, then select all 4 rules, disable them and enable again, then restart WinRM
service.
Upvotes: 0
Reputation: 841
To add to a4aravind's answer,
I was experiencing a similar problem in a Server 2k12 Core environment, but simply adding the firewall rules didn't help. In my case, the machines that were playing up were on a domain (or had recently been in a domain). I found that I had to do the following:
Having made these changes I was able to run Enable-PSRemoting, and then gpupdate to reapply the domain firewall rules.
Hopefully that'll help someone in a similar situation. A similar error message that I had on some of the machines was "Unable to enable the firewall for WinRM". I believe this was caused by group policy, and occurs when the message "For your security, some settings are controlled by Group Policy" is shown.
Note: In my case, the affected servers had all been built from an image that had previously been joined to the domain and picked up some dodgy GPO policies which messed up WinRM, before being removed from the domain and then added to our catalog. Which goes to show that you should check your images before pushing out a few dozen server images.
Upvotes: 2
Reputation: 1232
Oops...in my Inbound Rules of the Firewall settings, the Windows Remote Management(HTTP-In) Rule was not added. I added it and the issue got resolved. So, make sure you have all the inbound rules configured for the WinRM(Http-In) in the Firewall settings
Upvotes: 2