1. I use the ipconfig to determine the IP address of the workstation or server I am working on. Here some uses of ipconfig command:
b. ipconfig /all Shows all the IP settings plus DNS and MAC address.
c. ipconfig /release Clear the IP address
d. ipconfig /renew Request a new IP address.
e. ipconfig /flushdns Clears the DNS cache.
d. ipconfig /registerdns Registers new DNS settings.
2. I use the netdom command to do the following:
a. I use the netdom command to list the Primary Domain Controller in a Domain. To list the PDC for Northamerica, type the following at the command prompt:
netdom query /d:YourDomain PDC
b. I use the Netdom Query command to view Domain Trusts. To view all the direct trust relationships for the domain xyzDomain, type the following at the command prompt:
netdom query /d:xyzDomain /Ud:xyzDomain\admin DOMAIN /Direct
c. I use the Netdom Add command to add a Workstation or Member Server to a Windows Domain. To add the workstation myWorkstation to the Windows Server 2003 domain sales.example.com in the organizational unit (OU) MyCoolOU/workstations, type the following at the command prompt:
netdom add/d:sales.example.com myWorkstation /OU:OU=MyCoolOU,OU=Workstations,DC=example,DC=com
Note: If the /ou parameter is not specified, the account is created in the Computers container.
d. I used the Netdom Computername to rename a domain controller in a Windows Server 2003 domain. To rename the domain controller DC to altDC in the example.com domain use the following syntax:
netdom computername dc /makeprimary:altdc.example.com
To rename a member server you must choose one of the existing alternate names for the computer and make it the new primary name.
3. I use the memsnap command to read a snapshot of memory and write the information to a log. This is useful for identifying processes that are excessively consuming resources. Here is how to use memsnap:
memsnap /m memsnap.log
4. I use the net command to perform a varitey of tasks. Here are some of the ways I use the net command:
a. Identify folder shares on a system: net share
b. Stop a service: net stop [service_name]
c. Start a service: net start [service_name]
d. Map a network drive: net use S: \\ServerName\ShareName /user:mydomain\user-name “mypassword”
5. I use the nbtstat command to help me identify computer names and MAC addresses. Here is how I use it to identify a computer name:
nbtstat -a 192.168.1.55
6. I use the pingcommand to identify see if I can reach a IP addresses on the network. Here is how I use it: ping 192.168.1.55
Note: add -t at the end of that and you can continuously ping an IP address.
Note: to learn more just type nbtstat /?
7. I use the tracert command to see how an IP request travels to reach its destination. Here is how I use tracert: tracert 192.168.1.55
8. I use the nslookup command to identify IP addresses. I typically find this command useful for looking MX records or IP addresses of websites that have multiple IPs. Here are two examples.
a. Let’s say you have a need for identifying all the associated IP addresses for a domain. Open the command prompt and type the following: nslookup google
b. If you need to identify the MX record of a domain:
9. When creating a DHCP reservation and you need the MAC address use the arp command. Here is how: are -a 192.168.1.55
10. I use the route command to identify slow network printers. I typically use the route command to view and modify the IP routing table of the system I’m working on. Here is how you can use it:
a. To view all the routes on your system open the command prompt and type in route and press enter.
b. To add a route type the following:
route add 192.168.1.55 mask 255.255.255.0 192.168.1.1 metric 3 if 2
Note: the first IP is the destination, the second is the subnet and the last is the default gateway.
c. To delete a route type the following: route delete 192.168.1.55
That concludes the Top 10 Command Line Commands Windows I Use. If you would like to share a command line tool that you use on a regular basis please leave your comment below.
Thanks for taking the time to read this article.