Manage Learn to apply best practices and optimize your operations.

Top Windows command-line commands


Check Windows Firewall status with netsh advfirewall show allprofiles

Source:  iStock/RUSSELLTATEdotCOM
Visual Editor: Sarah Evans/TechTarget

It is important to know what type of firewall connection each user in your network has. If users are connected to the Internet, they have a public profile. If they are connected to an internal network they have a private profile. And if they're connected to a corporate network, they have a domain profile. You can use netsh advfirewall show allprofiles to identify what type of profile a user has. On remote computers, you have to use netsh -r computername advfirewall show allprofiles and the user must turn on remote registry access for the command to work.

To turn off the firewall for every profile no matter the connection type, you can use netsh advfirewall set allprofiles state off. If you want to turn on the firewall for remote computers with a public profile you can use netsh -r computername advfirewall set publicprofile state on. In addition, you can turn off the remote computer's firewall for private profiles using netsh -r computername advfirewall set privateprofile state off.

View All Photo Stories

Join the conversation


Send me notifications when other members comment.

Please create a username to comment.

How does the type of profile affect the quality of the firewall?
Dear all

according to this command: If i want to check location status. How can i do? Because i ever to use keyword via command line on my pc for find someone who use one router.please looking below:

netsh status show view profile or netsh view account.