Search This Blog

Sunday, April 2, 2017

Access Nano Server to Disable Windows Firewall

We are going to temporary disable Windows Firewall on Nano Server.

To start with:-
1. Open Powershell ISE with elevated right (run as administrator)
2. Set the trusted host

Set-Item WSMan:\LocalHost\Client\TrustedHosts "" 
#Above ip is Nano Server IP 

Set-Item WSMan:\LocalHost\Client\TrustedHosts *
3. Start the session

Enter-PSSession –ComputerName "" -Credential ~\Administrator
Enter your credential

4. To disable the Windows firewall, enter
netsh advfirewall set allprofiles state off

To enable back,
netsh advfirewall set allprofiles state on

5. To exit the session