Subscribe to Windows IT Pro
September 23, 2003 12:00 AM

Remote Command Service

Remotely administer and run command-line programs
Windows IT Pro
InstantDoc ID #40048
Rating: (1)

As an IT professional, you'd rather remotely control your system from the comfort of your desk than walk to the server room every time you need to make changes. And you probably also would like to reduce the number of Windows 2000 Server Terminal Services sessions you must open every time you want to run tasks or commands on the system. The Microsoft Windows 2000 Resource Kit's Remote Command Service tool, which lets you remotely administer and run command-line programs, can help you realize those goals.

I work in an environment that has more than 300 servers, about 40 of which are Citrix MetaFrame Windows XP servers. MetaFrame servers provide the same services and therefore tend to be identical in terms of hardware and software, so any changes I make to one server must be replicated to the rest of the servers—in my case, that means 40 Terminal Services or ICA sessions. Remote Command Service gives me an easier and more efficient way to perform these simple tasks. The tool can't perform miracles, but it can remotely handle a lot of the daily administrative tasks that otherwise require local logons. Let's look at some examples of how you can use this tool.

Uses for Remote Command Service
One command I frequently use is Change Logon, which lets you enable or disable user logons to a Terminal Services session. When you set Change Logon to disable, new users can't establish new connections to the server. You can also use this command to determine whether the user logon session mode status is enabled or disabled. Before I installed Remote Command Service, every time I wanted to perform maintenance on a server or prevent user logons to one or more servers, I had to log on and run Change Logon locally or install the Citrix management console locally, then use a GUI. The process was lengthy and required several steps to accomplish one simple task. After I installed Remote Command Service, I could enable, disable, or query any server from a command-line window on my workstation.

You can also use Remote Command Service to obtain a directory listing of files on a particular server (i.e., a simple Dir command) or to share a folder on that server. You can use the tool in conjunction with the Net Share command to remotely share and unshare directories. If you want to map a drive on one or more servers, you can use Remote Command Service with Net Use instead of logging on to the servers. And you can use the tool in scripts to deal with frequently used commands or tasks.

Installing and Using the Tool
To install and use the tool, install a copy of the resource kit on your machine. By default, the resource kit installs in \%systemroot%\Program Files\Resource Kit and stores the Remote Command Service files in a subdirectory named RCMD. The directory will contain two files: rcmd.exe, the file you use to launch the command-line client (you can copy and use this client on any machine from which you want to initiate commands), and rcmdsvc.exe, the server component that you install on every server or workstation you want to run remote commands on. The rcmd.exe file creates a command session, or "virtual console," whenever a client connects to the server. You can simultaneously connect as many as 10 clients to the remote command server on a computer, and all the clients operate securely and independently of one another.

To install rcmdsvc.exe, log on as an administrator to the XP, Win2K, or Windows NT 4.0 machine you want to run remote commands on, copy the file into \%systemroot%winnt\system32, and type

rcmdsvc -install

at the command prompt. To start the service, type

net start rcmdsvc

Related Content:

ARTICLE TOOLS

Comments
  • John
    4 years ago
    Jan 08, 2008

    this is getting old fast

  • Jim Kenzig
    9 years ago
    Oct 02, 2003

    More a question than a comment. Is it be possible to install the Remote Service on a Windows 2000 Workstation also?
    This might be an effective way to run a command on a remote workstation if so.

    Thanks,

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.