Talking Shop: Use the Windows Command Prompt to speed up remote support

Uses the Command Prompt for situations where Windows 2000s Microsoft Management Console (MMC) is too slow.

When you’re supporting a remote user with a slow network connection, Windows 2000's built-in Microsoft Management Console (MMC) isn't always your best answer. While this handy tool provides a simple, easy-to-use graphical interface, MMC can strain slow network connections and make it nearly impossible to get anything done. A better alternative in such situations is the Windows Command Prompt, said TechRepublic support technician Ted Laun.

“The thing about using the command line is that if I were to use the CMC (Computer Management Console snap-in to the MMC), my machine would be locked up for a while over a slow connection,” Laun said.

To support a user in a Chicago office over the company’s network, Laun’s signal must travel from TechRepublic's office in Louisville, KY, to San Francisco to Cambridge, MA, and then finally to Chicago. Complicating this cross-country trip is the fact that the Chicago office's connection to Cambridge is rather slow.

Here's how Ted uses the Command Prompt to work around this network nightmare.

Make the connection with telnet and Netsvc
One of Laun’s favorite tricks is to telnet into a user’s computer. This connection gives him virtually unlimited access to the remote workstation, allowing him to troubleshoot a host of problems. “When you telnet into someone’s computer, the entire command set is at your disposal,” he said.

Laun is quick to add, however, that constantly running the telnet service can pose a security hazard. To turn telnet services on and off, Laun relies on the Netsvc.exe program provided with the Windows 2000 Resource Kit. “The ability to start and stop services is a pretty powerful tool,” he said.

To start the telnet service on the remote computer, simply open a Command Prompt on your machine (which must have the Netsvc.exe program installed on it) and type
netsvc telnet \\computername /start

where computername is the name of the remote workstation. You can now use the telnet command to connect to the remote workstation. Once connected, it will be as if you are sitting at that machine with an open Command Prompt. From here, it’s a snap to roam around directories or run batch files on the remote machine.

Once you're connected, now what?
"One of the things I use telnet for the most is to check people's IP settings when they have network problems," Laun said. Once on the remote user's machine, he can ping other network addresses and use Ipconfig commands to troubleshoot the problem.

Manipulating services with the Netsvc command also is handy if a machine isn't regularly shut down. For example, Laun said he often starts and stops virus software to get it to update definitions.

Save time with batch files
Another of Laun’s favorite methods is to use the DOS Net use command before connecting with telnet to send a small batch file to the user's machine. Laun first opens a command prompt and enters the command
net use X: \\computername\admin$

As with the Netsvcs command, computername in the Net use command represents the name of the remote workstation. This maps a drive on Laun’s machine to the remote workstation's main Windows directory. The X: represents the local drive letter that will be mapped to the remote workstation. Remember to use a drive that is not already mapped to a network share.

Laun can now copy batch files from his computer to the remote computer, telnet to the remote computer (using the technique outlined above), and run the batch file. This is a real time-saver if Laun needs to perform multiple tasks.

Don't forget to turn off telnet
As mentioned earlier, allowing telnet to run constantly creates a security risk, so Laun turns telnet off after each troubleshooting session. To do this, he opens a Command Prompt and enters
netsvc telnet \\computername /stop

Again, computername represents the name of the remote workstation.

Quick and convenient
Because the command-line techniques outlined above require so little bandwidth, they allow for quick access to remote workstations even over the slowest of networks.

Another benefit is that while the connection to the remote machine is being made across the network, you are free to use your machine for other purposes. Just check back in the Command Prompt session to see if the connection has been made or batch file has completed running; if it hasn’t, you can return to other business.

If you want to dig deeper into its capabilities, run the  netsvc /? command and see what options are available.

How do you use Netsvc?
Ted Laun uses the Netsvc command mostly to start and stop telnet services on remote computers in his network. How do you use it? Have you found a way to use Netsvc to solve common user computer ailments? If so, tell us about it in the discussion below.


Editor's Picks