The Versatile Netsvc Utility

In the ServerTester.bat script, you use Microsoft Windows NT Server 4.0 Resource Kit's Netsvc utility to query your services to determine whether they're running, stopped, paused, or unavailable. However, you can use Netsvc for many other tasks because it offers many switches.

The syntax for Netsvc is

netsvc servicename \\servername /command

in which servicename is the name of the service, servername is the name of the computer, and /command is the switch option. The switches you can choose from are

  • /query (queries the status of the service)
  • /start (starts the service)
  • /stop (stops the service)
  • /pause (pauses the service)
  • /continue (starts the paused service)
  • /list (lists the installed services)

You can use the /list switch to obtain the real service names for the ServicesList.txt input file. To use this switch, you must omit the servicename from the syntax and specify the /list switch:

netsvc \\servername /list

You need to run this command against each server you plan to include in your server failure notification system.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.