Postingan

Check Windows Firewall status with netsh advfirewall show allprofiles

Gambar
Check Windows Firewall status with netsh advfirewall show allprofiles   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 firewal

Query the status of services with sc query state= all

Gambar
Query the status of services with sc query state= all   Anytime you want to know what services are installed on a computer and find out which ones are active, you can use sc query state= all to find a complete list. If the computer in question is remote, you should use sc \\computername query state= all . If you're looking for a specific service, you can use sc query service_name . To find the configuration information for a specific service, you can use sc qc service_name . To stop a particular service from running on a computer, use sc \\computername stop service_name . And if you have to start a service on a computer, you can use sc \\computername start service_name . Another query command that can come in handy if, for example, you have to see the results of a security audit is auditpol /get /category:* .With this command, you can ask for and establish audit settings on a local computer.  To see the same results in CSV format you can use auditpol /get /category:*

Shut down a computer with shutdown /s

Gambar
Shut down a computer with shutdown /s Sometimes, when you're going through your systems management routines, you may have to shut down or restart a user's computer. The shutdown /s command is a script to do just that. The user receives a notification saying their computer will shut down in one minute. If you are performing the command remotely, you should use shutdown /m \\computername /s . To automatically have the computer restart, you would use shutdown /r . If you start to shut down a computer and change your mind, you can abort the operation with shutdown /a . If you want to ensure the user has enough warning before the shutdown, you can give them two minutes with shutdown /r /t 120 /c "Shutting Down for maintenance" /f /d p:4:1 . If you don't need to shut down a user's computer but you do need to ensure it is fully updated before the Windows Update/Automatic Update client does its job, you can use wuauclt /detectnow to do so. Windows Upd

Query group policy settings with gpresult /R

Gambar
Query group policy settings with gpresult /R With gpresult /R you can see when the most recent changes to the Active Directory-based Group Policy settings took place on a computer and evaluate the current configuration. The policies determine a computer's system, security and user settings, including what the users can do on their computers, such as which files they can access and which apps they can use. If the computer is remote, then you should use gpresult /S computername /U username /P password /R . If you change Group Policy settings through the domain controller it can take 20-90 minutes for it to refresh and for the alterations to take hold. Sometimes you can't afford to wait that long because the user needs changes immediately. To make the updates go through faster, you can use gpupdate /force . The gpupdate command is the replacement for the former /refreshpolicy command. Another similar command -- gpresult /H filename.html -- displays the Group

Check the IP addresses of the local system with ipconfig /all

Gambar
  To see what is running on every network interface on a computer you can use ipconfig /all . The command also lets you explore a complete list of the addresses for Internet Protocols (IPs) and Media Access Controls, as well as default gateways, Dynamic Host Configuration Protocol (DHCP) statuses, specifications for network adapters and more. Another ipconfig command can help you in the event you can't connect to an internal network or some set of external resources because the domain name server (DNS) data is corrupt. The command is ipconfig /flushdns and it clears the DNS cache on the computer. To see what is in the current DNS cache, you can use ipconfig /displaydns . Also, net start dnscache will turn on the cache and, as you would expect, net stop dnscache turns it off. The latter will resolve any issues with an address each time you execute the command. Other related commands include ipconfig /release , which releases any currently assigned IP addresses, and i

When to use a command-line command

Gambar
  For desktop administrators,a graphical user interface provides helpful display features such as windows, pull-down menus and scroll bars. But a tried-and-true command-line command can accomplish almost all of the same tasks -- sometimes more efficiently, especially if you're scripting. Windows 7 has myriad command-line scripts built into the operating system that you can use to shut down a user's computer, turn a firewall on or off, or force an update. Because they're so useful and there are so many, it's a good idea to start exploring some basic Windows 7 command prompts. Here's one to get you started. If you run a large network space, you can apply all of the commands in this slideshow to a group of remote computers with this command-line command: FOR /L %i IN (1,1,254) DO netsh -r 192.168.1.%i advfirewall show allprofiles >192.168.1.%i.firewallstate.txt. This will execute whatever command you need on multiple computers or IP addresses.

Check Windows Firewall status with netsh advfirewall show allprofiles

Gambar
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 privat