In continuation of the previous guide, this section will introduce you to additional networking command-line tools in Windows. These tools are essential for managing network shares, user accounts, and tracing network paths. By mastering these commands, you'll be able to efficiently manage network resources and troubleshoot complex networking issues.
Check the previous article here - Guide to Networking Command-Line Tools in Windows - Beginners.
The `net use` Command
The `net use` command allows you to connect your computer to a shared folder or drive on the network. This command makes it possible to access a network resource as if it were a local drive on your computer.
Connecting to a Network Resource
To connect to an existing network share and view its mapped
drive letter:
1. Open the Command Prompt window.
2. Type the following command and press `Enter`:
net use z:
This command displays any existing network connections mapped to the `Z:` drive letter.
Mapping a Network Share to a Drive Letter
To map a network share or drive to a specific drive letter
on your system:
1. Type the following command and press `Enter`:
net use x: \\plabwin11\c$ /persistent:yes
- `x:` is the drive
letter you are assigning.
- `\\plabwin11\c$`
is the network path to the shared resource.
- The `/persistent:yes` parameter ensures that the mapping remains available after a system restart.
Verifying the Mapped Drive
To verify that the drive has been successfully mapped:
1. Open File Explorer from the Taskbar.
2. In the left pane, scroll down to see the mapped drive `c$ (\\plabwin11)` associated with drive letter `X:`. Click on it to view its contents.
Deleting a Mapped Drive
To remove the mapped network drive:
1. Restore the Command Prompt window.
2. Type the following command and press `Enter`:
net use x: /delete
This command deletes the mapping of the `X:` drive.
The `net user` Command
The `net user` command is a powerful tool for managing user accounts on a Windows computer. It allows you to create, modify, and delete user accounts, either locally or on a domain.
Viewing Local User Accounts
To view the list of all user accounts on the local system:
1. Type the following command and press `Enter`:
net user
This command lists all the user accounts on the local system.
Exploring Command Syntax and Parameters
To view the syntax and available parameters for the `net
user` command:
1. Type the following command and press `Enter`:
net user /?
This command displays detailed information about how to use the `net user` command and its various options.
Viewing Information About a Specific User
To view detailed information about a specific user account,
such as `Administrator`:
1. Type the following command and press `Enter`:
net user administrator
This command provides detailed information about the specified user account.
Creating a New User Account
To create a new user account named `Louis` with a password:
1. Type the following command and press `Enter`:
net user Louis Passw0rd /add /times:ALL
- `Louis` is the
username.
- `Passw0rd` is the
password.
- The `/add`
parameter creates the new user.
- The `/times:ALL` parameter allows the user to log in at any time.
Deleting a User Account
To delete the user account `Louis`:
1. Type the following command and press `Enter`:
net user Louis /delete
This command removes the user `Louis` from the system.
Verifying the Deletion of a User Account
To verify that the user account `Louis` has been deleted:
1. Type the following command and press `Enter`:
net user
The user `Louis` should no longer appear in the list of users.
The `tracert` Command
The `tracert` command traces the route that packets take from your computer to a destination IP address or hostname. It provides a list of all the intermediary devices (routers) the packet passes through.
Tracing the Path to an IP Address
To trace the path to a specific IP address:
1. Type the following command and press `Enter`:
tracert 192.168.0.1
This command shows
the path taken by packets to reach the IP address `192.168.0.1`.
Tracing Without Name Resolution
To trace the path to an IP address without resolving the
names of intermediary devices:
1. Type the following command and press `Enter`:
tracert -d 192.168.0.1
The `-d` parameter prevents the command from resolving IP addresses to hostnames, which speeds up the trace.
Tracing the Path to a Public IP Address
You can also trace a route to a public IP address or DNS
server:
1. Type the following command and press `Enter`:
tracert -d 8.8.8.8
This command traces the path to Google’s public DNS server.
- Note: Firewalls might block ICMP packets, causing some hops to timeout
Tracing the Path to a Domain Name
To trace the path to a domain name such as `intranet`:
1. Type the following command and press `Enter`:
tracert intranet
The `pathping` Command
The `pathping` command is a combination of `ping` and `tracert`. It provides detailed information about network latency and packet loss at each hop between your system and the destination.
Performing a Pathping to a Public DNS Server
To perform a pathping to Google’s public DNS server:
2. Type the following command and press `Enter`:
pathping 8.8.8.8
This command will take a few minutes to complete and provides a detailed analysis of each hop between your computer and the destination.
- Note: The
presence of `* * *` in the output indicates that ICMP traffic is blocked on one
or more devices along the path, which is common in secure networks.
Conclusion
By using these advanced networking command-line tools, you can efficiently manage network resources, user accounts, and analyze network paths. These commands are particularly useful for IT professionals who need to diagnose network issues, manage network shares, and handle user accounts in a Windows environment.