Does anyone know how to do this in POSH? I dont know where the default path is so I cant use netsh advfirewall … – and Enable-PSremoting does not do what I want it to. For WMI I have this:
netsh advfirewall set service RemoteAdmin enable netsh advfirewall firewall add rule dir=in name =”WMI” program=%systemroot%system32svchost.exe service=winmgmt action = allow protocol=TCP localport=any
Which I think is right? But I have no idea how to get the Windows Remote Management through the firewall. Also it has to be only on private networks not public. Any ideas?
Thanks
submitted by /u/m00fassa
[link] [comments]
The post POSH Script to Allow Windows Remote Management and WMI through Windows Firewall on Private Networks appeared first on How to Code .NET.