Skip navigation

Handy Administrative Utilities

Simplify administration with these resource kit scripts

In this Top 10, I present my favorite VBScript utilities that you can find in the Microsoft Windows NT Server 4.0 Resource Kit. These utilities provide useful administrative functions and demonstrate how to use the Web-Based Enterprise Management (WBEM) classes with VBScript. (For another opinion about some of these tools, see Mark Minasi, This Old Resource Kit, page 135.)

10. Addusers.vbs and delusers.vbs use Microsoft Active Directory Service Interfaces (ADSI) to add and delete users based on entries in a Microsoft Excel spreadsheet. Before you run these scripts, you must modify the addusers.xls or delusers.xls spreadsheets so that they contain the correct Directory Service (DS) entry for your server. Then, enter the following command:

addusers.vbs addusers.xls

9. Checkbios.vbs uses WBEM to display information about the system BIOS. You can optionally supply parameters that let the script query a remote system. The following example shows how to run checkbios.vbs on a networked system named remotesystem (using the logon remoteid and the password remotepwd):

cscript checkbios.vbs /s remotesystem /u
   remoteid /w remotepwd

8. Drives.vbs uses WBEM to display information about the system's physical disks. To check the disks on the current system, enter the following command:

cscript drives.vbs

7. Processor.vbs uses WBEM to display a local or remote system's CPU information. To get the processor information for the networked system named remotesystem (using the logon remoteid and the password remotepwd), enter the following command:

cscript processor.vbs /s remotesystem /u
   remoteid /w remotepwd

6. Ps.vbs retrieves process information (i.e., process ID, name of the executable program, path to the executable program) for all the current jobs running on the system. To retrieve the list of jobs running on the local system and write them to the file process.txt, enter the following command:

cscript ps.vbs /o process.txt

5. Protocolbinding.vbs displays a local or remote system's network protocol bindings. To run the script for the local system, enter the following command:

cscript protocolbinding.vbs

4. Eventlogmon.vbs uses WBEM to monitor either a local or remote event log. The script writes the record number, log file, source, and time of entry to the screen or an output file. This script runs until you press Ctrl+C (or Ctrl+Break).

cscript eventlogmon.vbs

3. Kill.vbs terminates a running job. First, use ps.vbs to write all the current jobs to an output file. Second, use findstr or grep to process the output file and locate a specific entry. Third, pass the task ID of that entry to the kill.vbs script. The following example shows how to kill the local process with the task ID 278:

cscript kill.vbs /x 278

2. Service.vbs is a powerful remote-administration script that lets you list, start, stop, and install a service on a local or remote system. To list all the services on the local system, enter the following command:

cscript service.vbs

1. Share.vbs uses WBEM to list, create, or delete a machine's shares from a local or remote system. To list all of remotesystem's shares (using the logon remoteid and the password remotepwd), enter the following command:

cscript share.vbs /s remotesystem /u
   remoteid /w remotepwd
Hide comments

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.
Publish