Remote Command
The Remote Command service lets you work from the command line of a remote computer.
September 14, 1999
Another simple remote-control tool
Have you ever wanted to open a command prompt window on one computer and work at the command prompt of a computer elsewhere on the network? The Microsoft Windows NT Server 4.0 Resource Kit has some great tools that let you do from the command line what NT lets you do from only the GUI. For example, regular readers of this column know that Addusers lets you modify user accounts and group membership; Netdom lets you change a workstation's domain membership and create and destroy trust relationships; Dhcpcmd lets you control your DHCP server and scopes; Winscl administers a WINS server; Rmtshare creates, destroys, and modifies permissions on file shares; and Xcacls does the same for NTFS permissions.
However, most of these tools can control only the machine you run them on. If you want to use Netdom to move a workstation's membership from one domain to another, you must walk over to that workstation, sit down, and run Netdom locally. In addition, you might soon be running Netdom more often; it's the primary in-the-box tool for moving NT 4.0 resource domains into Windows 2000 (Win2K) organizational units (OUs). Therefore, running some of these tools remotely will be a real benefit.
A few months ago, I wrote about the resource kit's Telnet service. Telnet is a useful service, but it isn't secure. Someone sniffing network packets can intercept your password as you log on to the Telnet server. This month, I describe an alternative service that uses NT authentication: Remote Command (RCMD). This service has two parts: the server portion and the client portion. Microsoft includes the RCMD service with the server resource kit but not with the workstation resource kit. (I strongly recommend that you obtain Supplement Three of the resource kit.)
Microsoft built the server portion of RCMD as a standard NT service that consists of just two files: rcmdsvc.exe and oemnsvrc.inf. You can find these files in the directory you installed the resource kit in. To install the service, copy these two files to the winntsystem32 directory of the server you want to control. Then, open the Network applet in Control Panel. Click the Services tab to show the network services (e.g., Server, DHCP), then click Add. After NT prepares its list of possible network services, you'll see the new option, Remote Command Server. Choose that option, then click OK. Control Panel will want to rebind the network services, so you'll need to reboot the system. Before you do, configure the Remote Command Server to start automatically. Close the Network applet, and open the Services applet. Scroll down the list, and you'll see that you now have a service called Remote Command Server. Click this entry, then click Startup. Choose Automatic to have the service start automatically when you boot.
After you reboot, look in the directory you put the resource kit files in for the program rcmd.exe. Copy this program to your workstation. (The resource kit license lets you copy resource kit files to all computers in one location.) You can use rcmd.exe in several ways. To run one command on a remote server, type
rcmd \
For example, the command
rcmd \ignatz dir
opens a window and displays the entire system32 directory from a remote server named Ignatz. As soon as the command is finished, the window closes. Typing
rcmd
causes the RCMD service to prompt you to enter the name of a server; type the name without the backslashes (e.g., Ignatz rather than \Ignatz). A command window opens, and you can type in as many commands as you like. The command
exit
closes the window. After you exit, RCMD prompts you for another server name. Press Ctrl+C to shut off RCMD.
Microsoft maintains that you can perform every administrative task in Win2K from the command line. If you learn RCMD now, you'll be all the more ready for Win2K.
About the Author
You May Also Like