I am trying to Enable Powershell Remoting on a Windows Server 2008, but from what I understand, the default firewall exception is that PSRemoting is only allowed if the computer (both client and server) resides in the same local subnet.
How to remove local subnet restriction in Windows Server 2008. I know in server 2012 and above, you can do:
Set-NetFirewallRule –Name "Name" –RemoteAddress Any
How to do exactly the same thing in Windows Server 2008?
Best Answer
Unfortunately, you cannot perform this task using the
Set-NetFirewallRule
cmdlet, as the WMI calls to enable the Firewall cmdlets are only available in 2012+.For Windows Server 2008, you can use
netsh advfirewall
. Example:You can still use PowerShell to run this command on remote systems, of course.
Alternatively, to answer a slightly different question, you can use psexec to enable PSRemoting quickly and easily (in most security contexts).