Command-Line Commands and Network Settings Back to Page 1
Here are some often used Command line commands with which a Help Desk professional should be familiar.
In the Windows search window type Cmd.
(Command prompt screen displays).
Right-click/ Run as administrator.
(Command line displays).
(Basic configuration details about your system and its network displays)
If instead, you type ipconfig /all and press ENTER.
(a more detailed screen displays).
Note: In the above screen, “DHCP Enabled” is set to No. This means that a static IP address has been set for this machine.
At the command prompt type “hostname” and press ENTER.
(The host’s machine name displays).
The ping command confirms connectivity between the sending machine and the destination address.
For example, type “ping 192.168.0.1” and press ENTER.
Connectivity with the destination address is confirmed by the four replies and the notice that there were zero “lost” packets.
Note: You can ping not only the destination’s address’s IP address, but you can also ping the destination’s machine name if you know it.
When a ping is sent, this is also called an echo request. In other words, the ping is requesting a reply (i.e., echo).
A regular ping stops after 4 results. The “-t” switch allows the echo requests and replies to continue indefinitely until you manually stop the request.
At the command prompt, type “ping 192.168.0.1 -t”.
To stop a ping or extended ping, press Ctrl+C, or close the command screen.
Name Server Lookup
This command brings back either the IP address of a device or its machine name, depending on which type of information is provided initially.
The “nslookup 192.168.0.1” above would bring back the corresponding machine name.
The “nslookup plabdc01” above comes back with the “fully qualified domain name” of “Plabdc01.PRACTICELABS.COM”, along with its corresponding address “192.168.0.1”.
A network utility that shows TCP network connections (incoming and outgoing). Also used to monitor traffic and possible network threats.
In the command line, type “netstat -a” and press ENTER.
(All the current connections display).
In the above screencap, note that the address is followed by a port number. For example, in “192.168.0.1:389”, “389” is the port number.
This command will scan a specified disk and list any issues (e.g., bad sectors, etc.). Note that it does not fix any discovered issues, only lists them
Thus “chkdsk: D” will scan drive D.
Adding the “/r” switch locates bad sectors and recovers readable information. (The disk must be idle.)
At the command prompt, type “whoami /fqdn” and press ENTER.
System and System32 folders contain the main Windows operating system files.
Path: C:/ Windows
This utility will scan and repair any issues with the system files.
At the command line, enter SFC /scannow and press ENTER.
Click the link below to access Microsoft’s online documentation, landing page.
Click the link below to access Microsoft’s online documentation for Windows commands:
For example, to search for information on the “chkdsk” command, enter “chkdsk” in the Search field.
NOTE: These commands are used a lot in Azure, for example. GUI is not always available for everything you might want to do, so learning these commands, or how to find them when needed, is important.
These settings determine how the host device connects with the rest of the local network, and beyond to the internet.
Click the network icon on the lower right.
Click Open Network and Internet Settings.
(“Settings/Status” screen displays).
(“Ethernet” settings display)
“Ethernet” is the networking technology that most pc’s use to connect devices to each other.
Under “Related Settings” click Network and Sharing Center.
(“Network and Sharing Center” displays.)
Notice, in this case, we have two adapters (“Access type” located on the right) for connecting to our two available networks.
Click Change adapter settings.
(“Network Connections” screen displays).
Right-click on Ethernet.
(“Properties” dialog box for the selected network adapter displays).
Currently, the internet protocol we are using is “Internet Protocol Version 4 (TCP/IP v4)”.
(Dialog box displays. Here you can change the IP settings, as needed.).
- If “Obtain an IP address automatically” is checked, it means that a DHCP server is dynamically providing the needed IP address to your host.
- If “Use the following IP address” is checked, it means that your device is has been manually identified with a static (i.e., unchanging) IP address.
Before communicating with other devices on the network, a host needs to identify its own address. If DHCP is used, then a host is dynamically assigned an IP address by the DHCP server. This address is temporary and changes each time the host accesses the network. If DHCP is not used then an engineer must manually provide a static (i.e., unchanging) address for the host.
In the present example, we are bypassing the default dynamic setting, and are manually adding a static IP address to our host.