Windows 2000 Resource Kit Remote Administration Scripts: Alphabetical List

This page requires a browser capable of displaying frames.


Remote Administration Scripts - Overview

The Remote Administration Scripts are a collection of Visual Basic (VB) script tools designed to perform specific administrative tasks for Windows 2000, Windows NT, Windows 95 and Windows 98 running Windows Management Instrumentation (WMI) and Active Directory.

For a complete list of the included scripts, click the following link:

Remote Administration Scripts alphabetical list

Running the Scripts

You can run a VB script in a Windows environment when Windows Script Host (WSH) is installed. WSH comes in two versions, a Windows shell executable version (Wscript.exe) and a command line version (Cscript.exe). Because you must run the Remote Administration Scripts using arguments, use Cscript.exe to run them. You can do this in two ways (note that when using Windows 95 or Windows 98, only the first method functions).

To run scripts using Cscript.exe:

  • Run the script from the command prompt or the Run line, using the following syntax:
    CSCRIPT.EXE path\scriptname.vbs arguments

-Or-

  • Set Cscript.exe as the default program used to run WSH using the following procedure:

To set Cscript.exe as the default Windows Script Host using Windows 2000 or Windows NT only:

  1. Type the following at the command prompt, or at the Run line:
    CSCRIPT.EXE //H:CSCRIPT //S
  2. Run the script by typing the following at the command prompt:
    Path\scriptname.vbs arguments

Note:

You can omitt The path in the above examples if the script is under the current directory or if the path to the script has been added to the system path environment variable.

Introductory Topics:

System Requirements

User Privilege Requirements

Customizing Windows Script Host

Disclaimer

Further Information and Web Links


System Requirements

To use the Remote Administration Scripts, your computer must fulfill the following system requirements:

  • It is a server or workstation running Windows 2000 or Windows 98.

  • It is a server or workstation running Windows NT 4.0 or Windows 95 and fulfills all of the following:

    • It is running WMI core and WMI SDK.

    • It is running WSH (Windows Script Host) 1.0 or later.


User Privilege Requirements

The user must have sufficient rights to run these scripts. This can be achieved in two ways:

  1. The user is a member of the WMI Users group and has been granted rights to read/write instances or execute methods on the server computer.

  2. The user is a member of the administrators group on the server computer.


Customizing Windows Script Host

You can customize Windows Script Host using the following command:

Cscript.exe //H:Cscript //nologo //s

This command changes the default mode of WSH to Cscript, and causes the output to display in the MS-DOS window, rather than in pop-up message boxes.


Notational Conventions

Convention | Meaning
bold | Characters that you type exactly as shown, including commands and switches. Menus and commands are also bold.
italic | Variables for which you supply a specific value. For example, Filename.ext could refer to any valid file name for the case in question.
Initial Capitals
(Filename.ext) 		Names of files should begin with an initial capital letter, for example, Filename.ext. Paths and folders can be uppercase, lowercase, or mixed, according to how they actually appear in a standard installation of the application or the operating system.
ALL CAPITALS | Names of acronyms.
Courier type
 Examples of code.
[ ] (square brackets) | In syntax descriptions, square brackets enclose optional items. If you include the item, type only the information between them, not the square brackets themselves.
{choice1 | choice2} (braces) | In syntax descriptions, braces enclose items which require a choice, such as {yes | no}. Type only one of the choices, not the braces or the dividing line.
Menu | Command (menus) | In referring to menu choices, Edit | Paste, for example, means to select the Edit menu and then choose the Paste command from it.


Disclaimer

Many of these tools were developed internally at Microsoft. You use these tools at your own risk. These tools are provided "as is" without warranty of any kind. Microsoft disclaims any implied warranty of merchantability and/or fitness for a particular purpose.

These tools have not been localized. They are written and tested in English only. Using these tools with a different language version of Windows 2000 might produce unpredictable results.


Further Information and Web Links

For more information about Windows Management Instrumentation (WMI), see the Internet MSDN Online Downloads Web site for the Microsoft Windows Management Instrumentation SDK.

For more information about Vbscript or Windows Script Host, see the Internet MSDN Online Web site.


Bus.vbs

Use Bus.vbs to display bus information for a computer.

Bus.vbs Topics

Bus.vbs Syntax

Bus.vbs Example


CacheInfo.vbs

Use CacheInfo.vbs to retrieve the cache information for a computer.

CacheInfo.vbs topics

CacheInfo.vbs Syntax

CacheInfo.vbs Example


CdRomDrives.vbs

CdRomDrives.vbs displays information on the CD-ROM drive installed on a local or remote computer.

CdRomDrives.vbs topics

CdRomDrives.vbs Syntax

CdRomDrives.vbs Example


CheckBios.vbs

CheckBios.vbs displays information about the system BIOS. This information includes version, release date, target operating systems, and BIOS characteristics.

Note:

The CheckBios.vbs output varies depending on the amount of information reported to the operating system by the system hardware.

CheckBios.vbs Topics:

CheckBios.vbs Syntax

CheckBios.vbs Example


CompSys.vbs

CompSys.vbs lists the properties of a computer system, including system type, domain, primary owner, network server mode, and infrared mode.

CompSys.vbs Topics:

CompSys.vbs Syntax

CompSys.vbs Example


DeviceMem.vbs

DeviceMem.vbs displays information on device memory address ranges.

DeviceMem.vbs Topics:

DeviceMem.vbs Syntax

DeviceMem.vbs Example


DiskPartition.vbs

DiskPartition.vbs displays the disk partition information for a computer.

DiskPartition.vbs Topics:

DiskPartition.vbs Syntax

DiskPartition.vbs Example


DmaChan.vbs

DmaChan.vbs lists the Direct Memory Access (DMA) channels on a computer.

DmaChan.vbs Topics

DmaChan.vbs Syntax

DmaChan.vbs Example


Drives.vbs

Drives.vbs displays information about physical disk drives.

Drives.vbs Topics:

Drives.vbs Syntax

Drives.vbs Example


EnableDhcp.vbs

Use EnableDhcp.vbs to enable DHCP for a network adapter on a computer.

EnableDhcp.vbs Topics:

EnableDhcp.vbs Syntax

EnableDhcp.vybs Example


IrqRes.vbs

IrqRes.vbs displays Interrupt Request Level (IRQ) resource information.

IrqRes.vbs Topics:

IrqRes.vbs Syntax

IrqRes.vbs Example


Keyboard.vbs

Keyboard.vbs displays configuration information about the keyboard. Information provided includes description, layout, number of function keys, power management support, and PNPdeviceID.

Keyboard.vbs Topics:

Keyboard.vbs Syntax

Keyboard.vbs Example


ListAdapters.vbs

Use ListAdapters.vbs to list the properties of all network adapters.

ListAdapters.vbs Topics:

ListAdapters.vbs Syntax

ListAdapters.vbs Example


ListDisplayConfig.vbs

ListDisplayConfig.vbs obtains the display configuration of a computer.

ListDisplayConfig.vbs Topics:

ListDisplayConfig.vbs Syntax

ListDisplayConfig.vbs Example


LogMemInfo.vbs

LogMemInfo.vbs obtains the logical memory configuration of a computer.

LogMemInfo.vbs Topics:

LogMemInfo.vbs Syntax

LogMemInfo.vhbs Example


LstDpConInfo.vbs

LstDpConInfo.vbs obtains the display controllor information of a computer.

LstDpConInfo.vbs Topics:

LstDpConInfo.vbs Syntax

LstDpConInfo.vbs Example


Motherboard.vbs

Motherboard.vbs displays the motherboard information for a computer. The information reported includes the name of the motherboard, the Device ID, and the primary and secondary bus type.

Note:

The information reported might vary depending on type and age of hardware.

Motherboard.vbs Topics:

Motherboard.vbs Syntax

Motherboard.vbs Example


Parallelport.vbs

Parallelport.vbs retrieves the parallel port information for a computer.

Parallelport.vbs Topics:

Parallelport.vbs Syntax

Parallelport.vbs Example


PointDev.vbs

PointDev.vbs retrieves the mouse or other pointing device information for a computer.

PointDev.vbs Topics:

PointDev.vbs Syntax

PointDev.vbs Example


Processor.vbs

Processor.vbs retrieves CPU information for a computer.

Note

Information reported may vary depending on type and age of hardware.

Processor.vbs Topics:

Processor.vbs Syntax

Processor.vbs Example


ScsiController.vbs

ScsiController.vbs retrieves the SCSI controller information about a computer.

ScsiController.vbs Topics:

ScsiController.vbs Syntax

ScsiController.vbs Example


SerialPort.vbs

SerialPort.vbs displays the serial port configurations.

SerialPort.vbs Topics:

SerialPort.vbs Syntax

SerialPort.vbs Example


SoundDevice.vbs

SoundDevice.vbs lists the sound device properties on a computer.

SoundDevice.vbs Topics:

SoundDevice.vbs Syntax

SoundDevice.vbs Example


TapeDrive.vbs

TapeDrive.vbs displays information about tape drives.

TapeDrive.vbs Topics:

TapeDrive.vbs Syntax

TapeDrive.vbs Example


ModifyLDAP.vbs: Tool Description

ModifyLDAP.vbs

This script allows an administrator to create, modify, assign and delete the Lightweight Directory Access Protocol (LDAP) Administration Policies to domain controllers.

LDAP Query Policies are used to control the behavior of domain controllers responding to LDAP queries. The query policies can be assigned as the default for use by all domain controllers, assigned to all domain controllers in a specific site or assigned to individual domain controllers.

ModifyLDAP.vbs Topics:

ModifyLDAP.vbs Syntax

ModifyLDAP.vbs Examples


NetConnections.vbs

NetConnections.vbs lists selected properties of network connections. Properties listed include status, name of remote share, provider name, persistence, and resource type.

NetConnections.vbs Topics:

NetConnections.vbs Syntax

NetConnections.vbs Example


NetworkProtocol.vbs

NetworkProtocol.vbs displays the network protocols running on a specified computer, and lists selected properties for each protocol.

NetworkProtocol.vbs Topics:

NetworkProtocol.vbs Syntax

NetworkProtocol.vbs Example


ProtocolBinding.vbs

ProtocolBinding.vbs displays information about protocol bindings.

ProtocolBinding.vbs Topics:

ProtocolBinding.vbs Syntax

ProtocolBinding.vbs Example


SchemaDiff.vbs

SchemaDiff.vbs allows an administrator to compare the schema on two different forests. It notes differences in the schema version number, compares the number of classes, for each class checks that the mandatory and optional attributes are the same, and for each attribute checks that the syntax and range match. This is useful for administrators who might be exporting objects from one forest and importing them into another and want know if the objects have the same class and attribute definitions.

SchemaDiff.vbs Topics:

  • SchemaDiff.vbs Syntax
  • SchemaDiff.vbs Examples


Share.vbs

Use Share.vbs to list or create (directory) shares on a computer.

Share.vbs Topics:

Share.vbs Syntax

Share.vbs Example


Subnet_ops.vbs

The subnet_op.vbs script helps administrator manipulate subnets objects in Active Directory. This script can add, delete and list all the subnets of the current domain. You can also use it to set the location property on a subnet object. This is useful if your oganization has enabled location tracking, a feature for finding printers using it's location in Active Directory.

Subnet_ops.vbs Topics:

Subnet_ops.vbs Syntax

Subnet_ops.vbs Example


BootConfig.vbs

Use BootConfig.vbs to display boot configuration information.

BootConfig.vbs topics

BootConfig.vbs Syntax

BootConfig.vbs Example


CodecFile.vbs

CodecFile.vbs displays information on codec files.

CodecFile.vbs Topics

CodecFile.vbs Syntax

CodecFile.vbs Example


Desktop.vbs

Desktop.vbs lists the desktop properties for all registered users of a computer.

Desktop.vbs Topics:

Desktop.vbs Syntax

Desktop.vbs Example


Device.vbs

Use Device.vbs to list all devices available on a computer, or to start or stop a device on a computer.

Device.vbs Topics

Device.vbs Syntax

Device.vbs Example


EnumClasses.vbs

Use EnumClasses.vbs to enumerate the names of all WMI classes within a given namespace on a computer.

EnumClasses.vbs Topics:

EnumClasses.vbs Syntax

EnumClasses.vbs Example


EnumInstances.vbs

Use EnumInstances.vbs to enumerate the WMI paths of all WMI objects within a given namespace on a computer.

EnumInstances.vbs Topics:

EnumInstances.vbs Syntax

EnumInstances.vbs Example


EnumNameSpaces.vbs

Use EnumNameSpaces.vbs to enumerate all WMI namespaces within a given namespace on a computer.

EnumNameSpaces.vbs Topics:

EnumNameSpaces.vbs Syntax

EnumNameSpaces.vbs Example


EventLogMon.vbs

Use EventLogMon.vbs to monitor Windows 2000 eventlog events on a computer and display them in a command window or output file.

Note

To stop EventLogMon.vbs, bring the system focus to the console window where EventLogMon.vbs is running, and then press Ctrl-C.

EventLogMon.vbs Topics:

EventLogMon.vbs Syntax

EventLogMon.vbs Example


Exec.vbs

Use Exec.vbs to execute a command or stop a process on a computer.

Exec.vbs Topics:

Exec.vbs Syntax

Exec.vbs Example


Fileman.vbs

Fileman.vbs allows you to copy, rename, delete, or take ownership of a file on a local or remote computer.

Fileman.vbs Topics:

Fileman.vbs Syntax

Fileman.vbs Example


LdOrderGrp.vbs

LdOrderGrp.vbs lists the service dependency groups on a computer. This is useful for troubleshooting system startup and configuration.

LdOrderGrp.vbs Topics:

LdOrderGrp.vbs Syntax

LdOrderGrp.vbs Example


ListFreeSpace.vbs

ListFreeSpace.vbs lists available disk space on all drives of a computer.

For a list of total drive space on a computer, see ListSpace.vbs.

ListFreeSpace.vbs Topics:

ListFreeSpace.vbs Syntax

ListFreeSpace.vbs Example


ListOs.vbs

ListOs.vbs lists properties of the operating system on a computer (including name, version, computer name, registered user, installation date, date and time of last start up).

ListOs.vbs Topics:

ListOs.vbs Syntax

ListOs.vbs Example


ListPrinters.vbs

Use ListPrinters.vbs to list properties of all printers installed on a computer.

ListPrinters.vbs Topics:

ListPrinters.vbs Syntax

ListPrinters.vbs Example


ListProperties.vbs

Use ListProperties.vbs to list properties of a given ADS object.

ListProperties.vbs Topics:

ListProperties.vbs Syntax

ListProperties.vbs Example


ListSpace.vbs

Use ListSpace.vbs to list the size of each disk drive on a computer.

For a list of free drive space on a computer, see ListFreeSpace.vbs.

ListSpace.vbs Topics:

ListSpace.vbs Syntax

ListSpace.vbs Example


OsReconfig.vbs

OsReconfig.vbs displays selected properties of the operating system recovery configuration for a computer and allows you to change the operating system recovery configuration from the command line.

OsReconfig.vbs Topics:

OsReconfig.vbs Syntax

OsReconfig.vbs Example


PageFile.vbs

PageFile.vbs displays the current page file configuration for a computer and allows you to change page file properties at the command line.

PageFile.vbs Topics:

PageFile.vbs Syntax

PageFile.vbs Example


Ps.vbs

Use Ps.vbs to list all processes currently running on a computer and their properties.

To stop a process currently running on a computer, see Exec.vbs.

To list all process in ascending order, see PSTop.vbs.

Ps.vbs Topics:

Ps.vbs Syntax

Ps.vbs Example


PsTop.vbs

PsTop.vbs lists processes according to CPU usage in descending order.

To stop a process currently running on a computer, see Exec.Vbs.

PsTop.vbs Topics:

PsTop.vbs Syntax

PsTop.vbs Example


Query.vbs

Use Query.vbs to perform a general WMI Query.

Query.vbs Topics:

Query.vbs Syntax

Query.vbs Example


RegConfig.vbs

RegConfig.vbs displays the current registry configuration or modifies the proposed size of the registry on a computer.

RegConfig.vbs Topics:

RegConfig.vbs Syntax

RegConfig.vbs Example


Restart.vbs

Use Restart.vbs to restart, logoff, poweroff, or shutdown a local or remote computer. Command line switches allow you to specify the time until restart, and to force the operation if desired.

Restart.vbs Topics:

Restart.vbs Syntax

Restart.vbs Example


Service.vbs

Use Service.vbs to list services on a computer or to administer services on a computer from the command line or a batch file. Administrative functions include starting, stopping, installing, removing, and configuring a service.

Service.vbs Topics:

Service.vbs Syntax

Service.vbs Example


Thread.vbs

Thread.vbs lists all threads currently running on a computer.

Thread.vbs Topics:

Thread.vbs Syntax

Thread.vbs Example


ChkUsers.vbs

ChkUsers.vbs is a Visual Basic script that checks a domain for users whose properties satisfy a specified criterion.

ChkUsers.vbs Topics

ChkUsers.vbs Syntax

ChkUsers.vbs Example


ClassifyMembers.vbs

ClassifyMembers.vbs is a Visual Basic script that lists the members of a container object or group object in an active directory. It returns the AdsPaths of the member objects, grouped according to their class types. You can write the results of ClassifyMembers.vbs to a text file or display them on screen if you choose.

ClassifyMembers.vbs Topics:

ClassifyMembers.Vbs Syntax

ClassifyMembers.Vbs Example


CreateUsers.Vbs: Tool description

CreateUsers.vbs

This command-line tool can be used to create multiple user accounts in a domain. Properties of the user accounts can be set as the accounts are created.

CreateUsers.vbs Topics:

CreateUsers.Vbs Syntax

CreateUsers.Vbs Example


CreateGroups.Vbs: Tool description

CreateGroups.vbs

This command-line tool can be used to create multiple user groups in a domain. Properties of these user groups can be set as the groups are created.

CreateGroups.vbs Topics:

CreateGroups.vbs Syntax

CreateGroups.vbs Example


DisplayOld.vbs

This script allows an administrator to query the directory for stale (unused) user and computer accounts based on the number of days since the user acount or computer account has logged on to the domain. If an output file is specified, it is written out using the LDIF format, enabling the administrator to delete the unused accounts using the LDIFDE import/export utility.

DisplayOld.vbs Topics:

  • DisplayOld.vbs Syntax
  • DisplayOld.vbs Examples


DisplayRID.vbs: Tool Description

DisplayRID.vbs

The multi-master model used by Active Directory allows updates to the directory to be performed against any domain controller. This is quite different from the model used by Windows NT version 4.0, where updates can only be performed on the Primary Domain Controller. Each user account must be allocated a unique security identifier (SID). To enable this to occur in a multi-master environment, and to prevent duplicate SIDs from being issued, each domain controller is granted a pool of relative identifiers (RID) for creating SIDs. The RID Pool size is 500. When a domain controller has used 80% of its RID Pool, it requests a new pool of RID's from the RID Operations Master. This script lists the current RID Operations Master, the total number of RID's remaining, the starting number for the next RID Pool, and for each domain controller, the starting number for its RID Pool, the next RID number to be issued, and the percentage of its RID Pool that has been consumed.

DisplayRID.vbs Topics:

  • DisplayRID.vbs Syntax
  • DisplayRID.vbs Examples


Group.vbs

Group.vbs displays the groups in the specified domain.

Group.vbs Topics:

Group.vbs Syntax

Group.vbs Example


GroupDescription.vbs

Use this command line tool to find the description of a group.

GroupDescription.vbs Topics:

GroupDescription.vbs Syntax

GroupDescription.vbs Example


ListDCs.vbs

Use this command-line tool to find all domain controllers of a domain with an LDAP provider.

ListDCs.vbs Topics:

ListDCs.vbs Syntax

ListDCs.vbs Example


Listdomains.vbs

Use this command-line tool to find all domains within a namespace. For a Windows NT provider it lists all member objects which are domains. For an LDAP provider it searches the whole namespace for domain objects.

Listdomains.vbs Topics:

Listdomains.vbs Syntax

Listdomains.vbs Example


ListMembers.vbs

ListMembers.vbs is a Visual Basic script that lists members of any container object or group object in an active directory, returning the ADsPaths of the member objects. It differs from ClassifyMembers.vbs in that the member object class can be specified, so that the member objects of only the specified class are listed. If no classes are specified, all members of the object are listed, but are not grouped by class.

ListMembers.vbs Topics

ListMembers.vbs Syntax

ListMembers.vbs Example


ModifyUsers.vbs

Use this script to modify the properties of multiple user accounts.

ModifyUsers.vbs Topics:

ModifyUsers.vbs Syntax

ModifyUsers.vbs Example


Programgroups.vbs

Programgroups.vbs enumerates the program groups listed in the start menu for each user on a computer.

Programgroups.vbs Topics:

Programgroups.vbs Syntax

Programgroups.vbs Example


Startup.vbs

Startup.vbs enumerates the startup programs on a computer.

Startup.vbs Topics:

Startup.vbs Syntax

Startup.vbs Example


SystemAccount.vbs

SystemAccount.vbs displays system account information.

SystemAccount.vbs Topics:

SystemAccount.vbs Syntax

SystemAccount.vbs Example


UserAccount.vbs

UserAccount.vbs displays user account information.

UserAccount.vbs Topics:

UserAccount.vbs Syntax

UserAccount.vbs Example


UserGroup.vbs

Use this command line tool to add multiple users to a group or delete multiple users from a group.

UserGroup.vbs Topics:

UserGroup.vbs Syntax

UserGroup.vbs Example


Remote Administration Scripts: Alphabetical list of Scripts

- B -

Topic BootConfig.vbs

Topic Bus.vbs

- C -

Topic CacheInfo.vbs

Topic CdRomDrives.vbs

Topic CheckBios.vbs

Topic ChkUsers.vbs

Topic ClassifyMembers.vbs

Topic CodecFile.vbs

Topic CompSys.vbs

Topic CreateGroups.vbs

Topic CreateUsers.vbs

- D -

Topic Desktop.vbs

Topic Device.vbs

Topic DeviceMem.vbs

Topic DisplayOld.vbs

Topic DisplayRID.vbs

Topic DiskPartition.vbs

Topic DmaChan.vbs

Topic Drives.vbs

- E -

Topic EnableDhcp.vbs

Topic EnumClasses.vbs

Topic EnumInstances.vbs

Topic EnumNameSpaces.vbs

Topic EventLogMon.vbs

Topic Exec.vbs

- F -

Topic Fileman.vbs

- G -

Topic Group.vbs

Topic GroupDescription.vbs

- I -

Topic IrqRes.vbs

- K -

Topic Keyboard.vbs

- L -

Topic LdOrderGrp.vbs

Topic ListAdapters.vbs

Topic ListDCs.vbs

Topic ListDisplayConfig.vbs

Topic ListDomains.vbs

Topic ListFreeSpace.vbs

Topic ListMembers.vbs

Topic ListOs.vbs

Topic ListPrinters.vbs

Topic ListProperties.vbs

Topic ListSpace.vbs

Topic LogMemInfo.vbs

Topic LstDpConInfo.vbs

- M -

Topic ModifyLDAP.vbs

Topic ModifyUsers.vbs

Topic Motherboard.vbs

- N -

Topic NetConnections.vbs

Topic NetworkProtocol.vbs

- O -

Topic OsReconfig.vbs

- P -

Topic PageFile.vbs

Topic Parallelport.vbs

Topic PointDev.vbs

Topic Processor.vbs

Topic Programgroups.vbs

Topic ProtocolBinding.vbs

Topic Ps.vbs

Topic PsTop.vbs

- Q -

Topic Query.vbs

- R -

Topic RegConfig.vbs

Topic Restart.vbs

- S -

Topic SchemaDiff.vbs

Topic ScsiController.vbs

Topic SerialPort.vbs

Topic Service.vbs

Topic Share.vbs

Topic Sounddevice.vbs

Topic Startup.vbs

Topic Subnet_ops.vbs

Topic SystemAccount.vbs

- T -

Topic TapeDrive.vbs

Topic Thread.vbs

- U -

Topic UserAccount.vbs

Topic UserGroup.vbs


Windows 2000 Resource Kit: Alphabetical List of Remote Administration Scripts

Windows 2000 Server Resource Kit Remote Administration Scripts
Alphabetical List of Scripts

A B C D E F G H I J K L M
N O P Q R S T U V W X Y Z


BootConfig.vbs Example

cscript BootConfig.vbs
receives the boot configuration for the current computer.
cscript BootConfig.vbs /S MyMachine2
receives the boot configuration for the computer MyMachine2.


BootConfig.vbs Syntax

command prompt Open command prompt now.

One Step BootConfig.vbs [/S server] [/U username] [/W password] [/O outputfile]

Where:

server
is the computer name.
outputfile
is the output file name.
username
is the current user's name.
password
is the password of the current user.


Bus.vbs Example

Bus.vbs
gets the bus information for the current computer.
Bus.vbs /S MyMachine2
gets the bus information for the computer MyMachine2.


Bus.vbs Syntax

command prompt Open command prompt now.

One Step Bus.vbs [/S server] [/U username] [/W password] [/O outputfile]

server
is the computer name.
outputfile
is the output file name.
username
is the current user's name.
password
is the password of the current user.


CacheInfo.vbs Example

CacheInfo.vbs
gets the cache information for the current computer.
CacheInfo.vbs /S MyMachine2
gets the cache information for the computer MyMachine2.


CacheInfo.vbs Syntax

command prompt Open command prompt now.

One Step Cacheinfo.vbs [/S server] [/U username] [/W password] [/O outputfile]

Where:

server
is the computer name.
outputfile
is the output file name.
username
is the current user's name.
password
is the password of the current user.


CdRomDrives.vbs Example

CdRomDrives.vbs
gets the CD-ROM configuration for the current computer.
CdRomDrives.vbs /S MyMachine2
gets the CD-ROM configuration for the computer MyMachine2.


CdRomDrives.vbs Syntax

command prompt Open command prompt now.

One Step Cdromdrives.vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username
is the current user's name.
password
is the password of the current user.


CheckBios.vbs Example

cscript CheckBios.vbs
gets the bios information for the current computer.
cscript CheckBios.vbs /S MyMachine2
gets the bios information for the computer MyMachine2.


CheckBios.vbs Syntax

command prompt Open command prompt now.

One Step CheckBios.vbs [/S server] [/O outputfile] [/U username] [/W password]

server
is the computer name.
outputfile
is the output file name.
username
is the current user's name.
password
is the password of the current user.


ChkUsers.vbs Example

Input:

ChkUsers.vbs /A:WinNT://MicrosoftMicrosoft /P:FullName;Description /C:"((LastLogin:>4/3/98 and LastLogin:<8/4/98)and AccountDisabled:=False)"

Output:

This checks for all active accounts with a login date between 4/3/98 and 8/4/98. A sample output is as follows:

Jeff Smith Description 1

Jeff Adell Description 2


ChkUsers.vbs Syntax

command prompt Open command prompt now.

One Step ChkUsers.vbs </A:adspath | /I:inputfile> [/P:properties] /C:criteria [/O:outputfile] [/U:username] [/W:password] [/Q] [/M] [/NQ]

Where:
adspath
is the AdsPath of a domain.
inputfile
is a file containing a list of AdsPaths of domains. You use it to check multiple domains.
properties
are the properties you want to retrieve.
criteria
specifies the search criterion/criteria you want to use (this is mandatory).
outputfile
is the output file name.
username and password
are the user name and password of the current user.
/Q
suppresses all output messages.
/M
specifies that the output is written to multiple files and the file names are specified in the program.
/NQ
At run time, ChkUsers creates certain temporary files named Users* in the current directory. Before it does this, ChkUsers checks for existing files named Users*, and displays a message asking the user if he or she wants delete these files if they are found. The /NQ switch suppresses this message, and causes files named Users* in the current directory to be deleted without asking the user.

Note:
The criterion parameter is mandatory. You must specify either ADsPath or inputfile, but not both. The default user name and password are those of the current user. If you do not specify properties, then AdsPaths are retrieved.


ClassifyMembers.Vbs examples

ClassifyMembers.vbs Example

Input:

ClassifyMembers.vbs LDAP://DC=MicrosoftMicrosoft,DC=Microsoft,DC=com

Output:

container 1: LDAP://CN=Computers,DC=MicrosoftMicrosoft,DC=Microsoft,DC=com
organizationalUnit 2: LDAP://OU=AddressBook,DC=MicrosoftMicrosoft,DC=Microsoft,DC=com
group 3: LDAP://CN=domain Users,DC=MicrosoftMicrosoft,DC=Microsoft,DC=com
user 4: LDAP://CN=John Smith,DC=MicrosoftMicrosoft,DC=Microsoft,DC=com


ClassifyMembers.vbs Syntax

command prompt Open command prompt now.

One Step Classifymembers.vbs adspath [/U:username] [/W:password] [/O: outputfile] [/Q]

Where:
adspath
is the AdsPath of the container or group object (this is mandatory).
username and password
are the username and password of the current user.
outputfile
is the output file name.
/Q
suppresses all output messages.

Note:

  • Only the AdsPath parameter is mandatory. The default username and password are those of the current user.

  • This script uses the schema of the ADS object represented by AdsPath.


CodecFile.vbs Example

CodecFile.vbs
gets the Codec file configuration for the current computer.
CodecFile.vbs /S MyMachine2
gets the Codec file configuration for the computer MyMachine2.


CodecFile.vbs Syntax

command prompt Open command prompt now.

One Step CodecFile.vbs [/S server] [/O outputfile] [/U username] [/W password] [/D]

server
is the computer name.
outputfile
is the output file name.
username
is the current user's name.
password
is the password of the current user.
/D
Displays the information in wide format.


CompSys.vbs Example

CompSys.vbs
lists the properties of a computer system for the current computer.
CompSys.vbs /S MyMachine2
lists the properties of a computer system for the computer MyMachine2.


CompSys.vbs Syntax

command prompt Open command prompt now.

One Step CompSys.vbs [/S server] [/U username] [/W password] [/O outputfile]

server
is the computer name.

outputfile
is the output file name.

username
is the current user's name.

password
is the password of the current user.


CreateGroups.Vbs examples

CreateGroups.vbs Example

CREATEGROUPS.VBS WinNT://Zodiac name:MyGroup
creates MyGroup in Zodiac domain.


CreateGroups.vbs Syntax

command prompt Open command prompt now.

One Step CreateGroups.vbs adspath </property1:propertyvalue1
[/property2:propertyvalue2 [...]] | /I:inputfile> [/U:username] [/W:password] [/Q]

Where:

adspath
is the ADsPath of a domain or container where the users group will be created.

inputfile
is an input file name. It is used where multiple user accounts are to be created.

property1, property2, …
are names of user group properties.

propertyvalue1, propertyvalue2, …
are values of corresponding user group properties.

username and password
are the user name and password of the current user.

/Q
suppresses all output messages.


CreateUsers.Vbs examples

CreateUsers.vbs Example

CreateUsers.Vbs WinNT://MyDomain name:JSmith password:Pass
creates a user record for Jeff Smith in MyDomain.
CreateUsers.Vbs LDAP://CN=users,DC=MyDomain,DC=Microsoft,DC=Com
    cn:”Jeff Smith” SamAccountName:JSmith password:pass
creates a user record for Jeff Smith in MyDomain with the specified data.
CreateUsers.Vbs WinNT://MyDomain /I:users.txt
creates user records for all entries listed in the file "users.txt". User.txt entries should be formatted as follows:
name:JSmith password:pass
name:RJones password:pass2


CreateUsers.vbs Syntax

command prompt Open command prompt now.

One Step CreateUsers.vbs adspath [/property1:propertyvalue1
[/property2:propertyvalue2 [...]] | /I:inputfile> [/U:username] [/W:password] [/Q]

Where:

adspath
is the ADsPath of a domain or container where the user accounts will be created (mandatory.)
inputfile
is an input file name. It is used where multiple user accounts are to be created.
property1, property2, …
are names of user properties.
propertyvalue1, propertyvalue2, …
are values of corresponding user properties.
username and password
are the user name and password of the current user.
/Q
suppresses all output messages.

Note:

The ADsPath parameter is mandatory. The default of username and password are those of the current user.

The name and password properties are required to create a user account using WinNT directory service.

The CN, SamAccountName and password properties are required to create a user account using LDAP directory service.


Desktop.vbs Example

DeskTop.vbs
lists the desktop properties for the current computer.
DeskTop.vbs /S MyMachine2
lists the desktop properties for the computer MyMachine2.


Desktop.vbs Syntax

command prompt Open command prompt now.

One Step Desktop.vbs [/S server] [/U username] [/W password] [/O outputfile]

server
is a computer name.
outputfile
is the output file name.
username
is the current user's name.
password
is the password of the current user.


Device.Vbs example

Device.vbs Examples

To list the installed devices for the computer MyMachine2, use the following script.

 cscript Device.vbs /L /S MyMachine2

To stop the device Beep on the current computer, use the following script.

 cscript Device.vbs /X /D Beep


Device.vbs Syntax

command prompt Open command prompt now.

1. To list installed devices:

One Step Device.Vbs /L [/S server] [/U username] [/W password] [/O outputfile]

2. To start, stop, remove, or set the mode of a device:

One Step Device.Vbs /G | /X | /R | /M startmode [/D Device] [/S server] [/U username] [/W password] [/O outputfile]

3. To install a device:

One Step Device.Vbs /I /D Device [/N DisplayName] [/S server] [/U username] [/W password] [/O outputfile]

Where:

/L
lists all devices available.
/G
starts a device.
/X
stops a device.
/R
removes a device.
/M
sets the device mode.
/I
installs a device.
Startmode
is the device startup setting.
Device
is the full name and path of the device.
DisplayName
is the device name that appears in the directory listing.
server
is a computer name.
outputfile
is the output file name.
username and password
is the user name and password of the current user.

Caution

Misusing this script might cause the operating system to become unstable.


DeviceMem.vbs Example

DeviceMem.vbs
gets the device memory address ranges for the current computer.
DeviceMem.vbs /S MyMachine2
gets the device memory address ranges for the computer MyMachine2.


DeviceMem.vbs Syntax

command prompt Open command prompt now.

One Step DeviceMem.vbs [/S server] [/O outputfile] [/U username] [/W password]

server
is a computer name.
outputfile
is the output file name.
username
is the current user's name.
password
is the password of the current user.


DiskPartition.Vbs example

DiskPartition.vbs
Get the disk partition information of the current machine.
DiskPartition.vbs /S MyMachine2
Get the disk partition information of the machine MyMachine2.


DiskPartition.vbs Syntax

command prompt Open command prompt now.

One Step DiskPartition.vbs [/S server] [/O outputfile] [/U username] [/W password]

server
is a computer name.
outputfile
is the output file name.
username
is the current user's name.
password
is the password of the current user.


DisplayOld.vbs Examples

To display all user accounts on the current domain that have not logged on during the previous 60 days, use the following script:

DISPLAYOLD.VBS /c:user /n:60

Output

Accounts that have not logged in since 6/25/1999 6:28:20 PM
Common Name               Logon Name           Last Logon
Jeff Smith                  Jsmith             Never
Jeff Adell		    Jadell             4/10/1999 9:10:47 AM
Julia Moseley	            Jmoseley	       5/29/1999 6:47:05 PM
3 records found


DisplayOld.vbs Syntax

command prompt Open command prompt now.

One Step DisplayOld.vbs /N:NumDays [/C:Class] [/F:filename] [/U:username] [/W:password] [/S:server] [/D:domain] [/Q]

Where:

/N:NumDays
Search for accounts older than n days.
/C:Class
Can be either User or computer (omit for both).
/F:Filename
Valid filename for output file (in LDIF format).
/U:Username
Username.
/W:Password
Password.
/S:Server
Name of domain controller.
/D:Domain
Name of domain in either NetBIOS, domain name or DNS format.


DisplayRID.vbs Examples

Displayrid.VBS
Displays RID information for the current domain.

Output:

RID Pool for domain DC=ntdev,DC=microsoft,DC=com

RID FSMO Master
FSMO Master	          Site  	               RID Pool Remaining	 Next RID Pool
CN=NTDEV-DC-07       ITG-Red-Bldg11     16777215            	 2891779

Server		          Site	                Start  	    End 	       Next	% used
CN=NTDEV-DC-07      ITG-Red-Bldg11       2891279	    2891778   2891328   	 9
CN=NTDSDC1            ITG-Red-Bldg11       2883779 	    2884278   2884095     63
CN=NTDSDC5            ITG-Red-Bldg11       2877267  	    2877766   2877594     65
CN=NTDEV-DC-08      Red-Bldg40             2890279  	    2890778   2890366     17
CN=NTDSDC              Red-Bldg40             2876267  	    2876766   2876537     54
CN=NTDSDC9            Red-Bldg40             2888279    	    2888778   2888336     11
CN=NTDSDCB            Red-Bldg40            2885279    	    2885778   2885741     92
 --> Next Pool                            	  2889779 	    2890278


DisplayRID.vbs Syntax

command prompt Open command prompt now.

One Step Displayrid.vbs [/F:filename] [/U:username] [/W:password] [/S:server] [/D:domain] [/Q]

Where:

/F:Filename
is the valid filename for output file.
/U:Username
is the username.
/W:Password
is the password.
/S:Server
is the name of the domain controller.
/D:Domain
is the name of the domain in either NetBIOS, domain name or DNS format.


DmaChan.vbs Example

DMAchan.vbs
lists the DMA channels for the current computer.
DMAchan.vbs /S MyMachine2
lists the DMA channels for the computer MyMachine2.


DmaChan.vbs Syntax

command prompt Open command prompt now.

One Step DmaChan.vbs [/S server] [/O outputfile] [/U username] [/W password]

server
is a computer name.
outputfile
is the output file name.
username
is the current user's name.
password
is the password of the current user.


Drives.vbs Example

Drives.vbs
gets the drive configuration for the current computer.
Drives.vbs /S MyMachine2
gets the drive configuration for the computer MyMachine2.


Drives.vbs Syntax

command prompt Open command prompt now.

One Step Drives.vbs [/S server] [/O outputfile] [/U username] [/W password]

server
is a computer name.
outputfile
is the output file name.
username
is the current user's name.
password
is the password of the current user.


EnableDhcp.vbs Example

EnableDhcp.Vbs /L /S MyMachine
lists the service names of all network adapters on the computer MyMachine.
EnableDhcp.Vbs /A CE3 /S MyMachine
enables DHCP for network adapter “CE3” on the computer MyMachine.
EnableDhcp.VBS /A DCX32 /S MyMachine2
enables DHCP for adapter DCX32 on MyMachine2.


EnableDhcp.vbs Syntax

command prompt Open command prompt now.

One Step 1. EnableDhcp.Vbs /A adapter [/S server] [/U username] [/W password] [/O outputfile]

One Step 2. EnableDhcp.Vbs /L [/S server] [/U username] [/W password] [/O outputfile]

Where:

/A adapter
enables DHCP for the specified network adapter service name.
/L
lists all the servicenames of all network adapters available.
server
is a computer name.
username and password
are the user name and password of the current user.
outputfile
is the output file name.


EnumClasses.vbs Example

EnumClasses.Vbs /C __SystemClass /N root\cimv2 /S MyMachine
lists all classes directly derived from __SystemClass within root\cimv2 on the computer MyMachine.
EnumClasses.Vbs /N root\cimv2 /R /S MyMachine
lists all classes within root\cimv2 on the computer MyMachine.


EnumClasses.vbs Syntax

command prompt Open command prompt now.

One Step EnumClasses.Vbs [/N namespace] [/C class] [/R] [/S server] [/O outputfile] [/U username] [/W password]

Where:

namespace
is a namespace string. The default is root/cimv2.
class
is a class name. Only classes derived from this class are enumerated.
/R
recursively enumerates subclasses.
server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


EnumInstances.vbs Example

EnumInstances.Vbs /C Win32_Process /S MyMachine
lists the WMI paths of all processes currently running on the computer MyMachine.
EnumInstances.Vbs /C CIM_Setting /R /S MyMachine
lists the WMI paths of all instances of class CIM_Setting and its subclasses.


EnumInstances.vbs Syntax

command prompt Open command prompt now.

One Step EnumInstances.vbs [/N namespace] [/C class] [/R] [/S server] [/O outputfile] [/U username] [/W password]

Where:

class
is a class name. Only classes derived from this class will be enumerated.
namespace
is a namespace string. The default is root/cimv2.
/R
recursively enumerates subclasses.
server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


EnumNameSpaces.vbs Example

EnumNameSpaces.vbs /S MyMachine
lists all WMI namespaces on the computer MyMachine.


EnumNameSpaces.vbs Syntax

command prompt Open command prompt now.

One Step EnumNameSpaces.vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


EventLogMon.vbs Example

EventLogMon.Vbs /S MyMachine
prints a message on the screen when the eventlog of the computer MyMachine receives an event.


EventLogMon.vbs Syntax

command prompt Open command prompt now.

One Step EventLogMon.Vbs [/S server] [/U username] [/W password] [/O outputfile]

Where:

server
is a computer name.
username and password
are the user name and password of the current user.
outputfile
is the output file name.

Note

To stop EventLogMon.vbs, bring the system focus to the console window where EventLogMon.vbs is running, and then press Ctrl-C.


Exec.vbs Example

Exec.Vbs /e "notepad mytext.txt" /S MyMachine
opens the file MyText.txt using NotePad on the computer MyMachine.
Exec.Vbs /x 1120 /S MyMachine
stops the process with a process ID of 1120 on the computer MyMachine.


Exec.vbs Syntax

command prompt Open command prompt now.

1. To execute a command

One Step Exec.vbs /e command [/S server] [/O outputfile] [/U username] [/W password]

2. To stop a running process

One Step Exec.vbs /x processID [/S server] [/O outputfile] [/U username] [/W password]

Where:

command
is a command to be executed (the entire command must be enclosed in quotes if it contains spaces.)
processID
is the number of the running process. You can obtain the processID using Ps.vbs or Pstop.vbs.
server
is a computer name.
outputfile
Is the output file name.
username and password
are the user name and password of the current user.


Fileman.vbs Example

FileMan.vbs /D myfile.txt
deletes myfile.txt in the current directory.
FileMan.vbs  /D C:\myfile.txt /S MyMachine2
deletes myfile.txt on the computer MyMachine2.
FileMan.vbs /S MyMachine2 /R C:\myfile.txt Project1.txt
renames myfile.txt to Project1.txt on the computer MyMachine2.


Fileman.vbs Syntax

command prompt Open command prompt now.

1. To delete or take ownership of a file

One Step FileMan.vbs /D TargetFile | /T TargetFile [/S server] [/U username] [/W password] [/O outputfile]

2. To rename or copy a file

One Step FileMan.vbs /R TargetFile | /C TargetFile /N NewFile [/S server] [/U username] [/W password] [/O outputfile]

Where:

/D TargetFile
deletes the file TargetFile.
/T TargetFile
takes ownership of the file TargetFile.
/C TargetFile /N NewFile
copies the file TargetFile to a file specified in NewFile.
/R TargetFile /N NewFile
renames the file TargetFile to a file specified in NewFile.
server
is a computer name.
outputfile
is the output file name.
username
is the current user's name.
password
is the password of the current user.


Group.Vbs example

Group.vbs
Lists the account groups for the current machine.
Group.vbs /S MyMachine2
Lists the account groups for the machine MyMachine2.


Group.vbs Syntax

command prompt Open command prompt now.

One Step Group.vbs [/S server] [/O outputfile] [/U username] [/W password] [/D domain]

Where:

server
is a computer name.
outputfile
is the output file name.
username
is the current user's name.
password
is the password of the current user.
domain
is the desired domain for group listing.


GroupDescription.Vbs example

GroupDescription.Vbs /A:"WinNT:\\MyDomain\domain users" /Q
prints the description of the "domain users" group of MyDomain.

Output

"WinNT://MyDomain/domain Users" description:
            All domain users


GroupDescription.vbs Syntax

command prompt Open command prompt now.

One Step GroupDescription.vbs </A:adspath | /I:inputfile> [/O:outputfile] [/U:username] [/W:password] [/Q]

Where:

adspath
is the ADsPath of the container or group object.
inputfile
is a text file containing a list of ADsPaths of groups.
outputfile
is the output file name.
username and password
are the user name and password of the current user.
/Q
suppresses all output messages.

Note:
Either the ADsPath or inputfile parameter must be provided, but not both. The default of username and password are those of the current user.


IrqRes.vbs Example

IrqRes.vbs
lists Interrupt Request Level (IRQ) resource information for the current computer.
IrqRes.vbs /S MyMachine2
lists IRQ resource information for the computer MyMachine2.


IrqRes.vbs Syntax

command prompt Open command prompt now.

One Step IrqRes.vbs [/S server] [/U username] [/W password] [/O outputfile]

Where:

server
is a computer name.
outputfile
is the output file name.
username
is the current user's name.
password
is the password of the current user.


Keyboard.vbs Example

Keyboard.vbs
gets the keyboard configuration for the current computer.
Keyboard.vbs /S MyMachine2
gets the keyboard configuration for the computer MyMachine2.


Keyboard.vbs Syntax

command prompt Open command prompt now.

One Step Keyboard.vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username
is the current user's name.
password
is the password of the current user.


LdOrderGrp.vbs Example

LdOrderGrp.vbs
lists the service dependency groups for the current computer.
LdOrderGrp.vbs /S MyMachine2
lists the service dependency groups for the computer MyMachine2.


LdOrderGrp.vbs Syntax

command prompt Open command prompt now.

One Step LdOrderGrp.vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username
is the current user's name.
password
is the password of the current user.


ListAdapters.vbs Example

ListAdapters.vbs /S MyMachine
Lists the names of all available properties of adapters on the computer MyMachine.


ListAdapters.vbs Syntax

command prompt Open command prompt now.

One Step ListAdapters.Vbs [/S server] [/U username] [/W password] [/O outputfile]

Where:

server
is a computer name.
username and password
are the user name and password of the current user.
outputfile
is the output file name.


ListDCs.vbs Example

Input:

ListDCs.Vbs “LDAP:\\CN=Computers,DC=MicrosoftMicrosoft,DC=Microsoft,DC=Com” /Q

Output:

LDAP:\\CN=DC1,CN=Computers,DC=MicrosoftMicrosoft,DC=Microsoft,DC=Com
LDAP:\\CN=DC2,CN=Computers,DC=MicrosoftMicrosoft,DC=Microsoft,DC=Com
LDAP:\\CN=DC3,CN=Computers,DC=MicrosoftMicrosoft,DC=Microsoft,DC=Com


ListDCs.vbs Syntax

command prompt Open command prompt now.

One Step ListDCs.vbs adspath [/O:outputfile] [/U:username] [/W:password] [/Q]

Where:

adspath
is the ADsPath of a container object containing all computer objects in a domain.
outputfile
is the output file name.
username and password
are the user name and password of the current user.
/Q
suppresses all output messages.

Notes

  • This script works only with an LDAP provider.

  • The default of username and password are those of the current user.


ListDisplayConfig.Vbs example

ListDisplayConfig.VBS
Obtains the display configuration of the current machine.
ListDisplayConfig.VBS /S:MyMachine2
Obtains the display configuration of machine MyMachine2.


ListDisplayConfig.vbs Syntax

command prompt Open command prompt now.

One Step ListDisplayConfig.vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username
is the current user's name.
password
is the password of the current user.


Listdomains.vbs Example

Input:

Listdomains.Vbs WinNT: /Q

Output:

WinNT://domain1
WinNT://domain2


Listdomains.vbs Syntax

command prompt Open command prompt now.

One Step Listdomains.vbs adspath [/O:outputfile] [/U:username] [/W:password] [/Q]

Where:

adspath
is the ADsPath of the root of a namespace.
outputfile
is the output file name.
username and password
are the user name and password of the current user.
/Q
suppresses all output messages.

Note:

  • This script works with both Windows NT and LDAP providers.

  • The default of username and password are those of the current user.


ListFreeSpace.vbs Example

ListFreeSpace.vBS /S MyMachine2
Lists available space on all drives of the computer MyMachine2.


ListFreeSpace.vbs Syntax

command prompt Open command prompt now.

One Step ListFreeSpace.vbs [/S server] [/U username] [/W password] [/O outputfile]

Where:

server
is a computer name.
username
is the current user's name.
password
is the password of the current user.
outputfile
is the output file name.


ListMembers.vbs Example

Input:

ListMembers.vbs LDAP://CN=Users,DC=Microsoft,DC=MyDomain,DC=com /C:group /Q

Output:

Group 1: LDAP://CN=domain Admins,CN=Users,DC=Microsoft,DC=MyDomain,DC=com
Group 2: LDAP://CN=domain Computers,CN=Users,DC=Microsoft,DC=MyDomain,DC=com
Group 3: LDAP://CN=domain Guests,CN=Users,DC=Microsoft,DC=MyDomain,DC=com
Group 4: LDAP://CN=domain Users,CN=Users,DC=Microsoft,DC=MyDomain,DC=com


ListMembers.vbs Syntax

command prompt Open command prompt now.

One Step Listmembers.vbs adspath [/C:Class] [/O: outputfile] [/U:username] [/W:password] [/Q]

Where:
adspath
is the ADsPath of the container or group object.
outputfile
is the output file name.
Class
specifies the class of the member objects to be listed.
username and password
are the user name and password of the current user.
/Q
suppresses all output messages.

Note:

  • Only the adspath parameter is mandatory. The default user name and password are those of the current user.

  • This script does not make use of the schema of the ADS object represented by ADsPath.

  • Unless the outputfile parameter is specified, the output is written to the screen.


ListOs.vbs Example

LISTOS.VBS /S MyMachine2
lists properties of the operating system on the computer MyMachine2.


ListOs.vbs Syntax

command prompt Open command prompt now.

One Step ListOS.vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username
is the current user's name.
password
is the password of the current user.


ListPrinters.vbs Example

ListPrinters.vbs
Lists printer information for the current computer.
ListPrinters.vbs /S MyMachine
Lists printer information for all printers on the computer MyMachine.


ListPrinters.vbs Syntax

command prompt Open command prompt now.

One Step ListPrinters.Vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


ListProperties.Vbs example

ListProperties.Vbs "WinNT://MyDomain"
Lists the ADS properties of the object MyDomain.


ListProperties.vbs Syntax

command prompt Open command prompt now.

One Step ListProperties.vbs adspath [/O: outputfile] [/U:username] [/W:password] [/Q]

Where:

adspath
is the ADsPath of the container or group object.
outputfile
is the output file name.
username and password
are the user name and password of the current user.
/Q
suppresses all output messages.

Note:

  • Only the ADspath parameter is mandatory. The default user name and password are those of the current user.

  • To exit the property list display screen after running the script, type Q on the command line.


ListSpace.vbs Example

ListSpace.vbs /S MyMachine
Lists the size of each drive on the computer MyMachine.


ListSpace.vbs Syntax

command prompt Open command prompt now.

One Step ListSpace.Vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


LogMemInfo.vbs Example

Logmeminfo.vbs
Obtains the logical memory configuration of the current computer.
Logmeminfo.vbs /S MyMachine2
Obtains the logical memory configuration of the computer MyMachine2.


LogMemInfo.vbs Syntax

command prompt Open command prompt now.

One Step LogMemInfo.vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


LstDpConInfo.vbs Example

Lstdpconinfo.vbs

Obtains the logical memory configuration of the current computer.

Lstdpconinfo.vbs /S MyMachine2

Obtains the logical memory configuration of the computer MyMachine2.


LstDpConInfo.vbs Syntax

command prompt Open command prompt now.

One Step LstDpConInfo.Vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


ModifyLDAP.vbs Examples

Modifyldap.vbs /P /O:"HQ Site Policy"
Lists the current settings for a query policy named "HQ Site Policy":

Output:

0. MaxDatagramRecv=1024
1. MaxPoolThreads=4
2. MaxResultSetSize=262144
3. MaxTempTableSize=10000
4. MaxQueryDuration=120
5. MaxPageSize=1000
6. MaxNotificationPerConn=5
7. MaxActiveQueries=20
8. MaxConnIdleTime=900
9. InitRecvTimeOut=120
10. MaxConnections=5000
Modifyldap.vbs /C /O:"Branch Office Policy" MaxConnections:1000
Creates a new query policy named "Branch Office Policy", and specifies the maximum number of concurrent LDAP connections to be 1000 with the remainder of the values set to their defaults:

Output:

Created policy Branch Office Policy with the following settings:
MaxConnections=1000
MaxDatagramRecv=1024
MaxPoolThreads=4
MaxResultSetSize=262144
MaxTempTableSize=10000
MaxQueryDuration=120
MaxPageSize=1000
MaxNotificationPerConn=5
MaxActiveQueries=20
MaxConnIdleTime=900
InitRecvTimeOut=120

Placeholder ...

Modifyldap.vbs /A /O:"Branch Office Policy" /S:Antipodes
Assigns the query policy named "Branch Office Policy" to the site named "Antipodes":

Output:

Server Antipodes was updated
Modifyldap.vbs /M /O:"Branch Office Policy" MaxActiveQueries:10
Modifies the existing query policy named "Branch Office Policy" and set the Maximum Number of Active Queries to 10:

Output:

Branch Office Policy updated


ModifyLDAP.vbs Syntax

command prompt Open command prompt now.

One Step modifyldap.vbs [/A|T|C|D|M|P|R] /O:Policy [/F:filename] [property1:propertyvalue1] [property2:propertyvalue2...] [/U:username] [/W:password] [/S:server] [/Q]

Where:

/C
creates a new query policy.
/D
deletes an existing query policy.
/M
modifies an existing query policy.
/A
assigns a policy to a site or server.
/R
removes a policy from a site or server.
/P
displays the LDAP Administrator limits for a query policy.
/C
creates a new query policy.
/C
creates a new query policy.
/O:Policy
is the name of a Policy object.
/F:Filename
is the valid file name for an output file (in LDIF format).
[property1:propertyvalue1] [property2:propertyvalue2...]
is the name and value of the LDAP parameters.
/U:Username
is the user name.
/W:Password
is the password.
/S:Server
is the name of the domain controller or site.
/Q
is the quiet mode.


ModifyUsers.vbs Example

ModifyUsers.vbs WinNT://MicrosoftMicrosoft
 name:JSmith  password:PassNew Description:"new domain user"
changes the password of JSmith to PassNew and description to
" new domain user".
ModifyUsers.vbs LDAP://CN=users,DC=MicrosoftMicrosoft,DC=Microsoft,DC=Com /I:modify.txt
Where modify.txt contains the following:
cn:"Jeff Smith" passwordexpired:1
cn:"Todd Young" passwordexpired:1
Changes both users’ password to expired and forces the users to change their password the next time they log on.


ModifyUsers.vbs Syntax

command prompt Open command prompt now.

One Step ModifyUsers.vbs adspath [/I:inputfile] [/U:username] [/W:password] [/property1:propertyvalue1] [/property2:propertyvalue2] [/all] [/Q]

Where:

adspath
is the ADsPath of a domain or container where the users accounts will be created.
inputfile
is an input file name. It is used where multiple user accounts are to be created.
username and password
are the user name and password of the current user.
property1, property2, …
are names of user properties.
propertyvalue1, propertyvalue2, …
are the values to be replaced for the corresponding user properties.
/all
changes attributes of all users in the domain to the same values.
/Q
suppresses all output messages.

Note: The ADsPath is mandatory. The default of user name and password are those of the current user.


Motherboard.Vbs example

MotherBoard.vbs
gets the motherboard information for the current computer.
MotherBoard.vbs /S MyMachine2
gets the motherboard information for the computer MyMachine2.


Motherboard.vbs Syntax

command prompt Open command prompt now.

One Step Motherboard.Vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


NetConnections.vbs Example

Netconnections.vbs

displays the network connections of the current computer.

Netconnections.vbs /S MyMachine2

displays the network connections of the computer MyMachine2.


NetConnections.vbs Syntax

command prompt Open command prompt now.

One Step NetConnections.vbs [/S server] [/U username] [/W password] [/O outputfile]

Where:

server
is a computer name.
username and password
are the user name and password of the current user.
outputfile
is the output file name.


NetworkProtocol.vbs Example

NetworkProtocol.vbs
gets the network protocol configuration for the current computer.
NetworkProtocol.vbs /S MyMachine2
gets the network protocol for the computer MyMachine2.


NetworkProtocol.vbs Syntax

command prompt Open command prompt now.

One Step NetworkProtocol.Vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


OsReconfig.vbs Example

OSRECONFIG.vbs
gets the operating system recovery configuration for the current computer.
OSRECONFIG.vbs /S MyMachine2
gets the operating system recovery configuration for the computer MyMachine2.
OSRECONFIG.vbs /S MyMachine2 /T ws
toggles the Write To System Log option for the computer MyMachine2.


OsReconfig.vbs Syntax

command prompt Open command prompt now.

One Step OSRECONFIG.vbs [/S server] [/U username] [/W password] [/T code] [/O outputfile]

Where:

server
is a computer name.
username and password
are the user name and password of the current user.
code
is a two letter code signifying which option to toggle.
The possible codes are as follows:

Code      Description
WS         Write to system log
WD         Write debug information
SA         Send sdministrator alert
OD         Overwrite existing debug file
KD         Kernel dump only
AR         Automatic restart
outputfile
is the output file name.


PageFile.vbs Example

  • pagefile /L /s HerMachine /u HerGuest /w GuestPass

    • lists page file information for the server Hermachine.

  • pagefile /R /M 512 /Z 128 /P C:\Pagefile.sys /B /s HisMachine /u HisGuest

    • resizes the page file for the server HisMachine and restarts it.


PageFile.vbs Syntax

command prompt Open command prompt now.

One Step PageFile.vbs /L [/S server] [/O outputfile] [/U username] [/W password]

One Step PageFile.vbs /R /M maxsize /Z minsize /P pagefile [/B] [/F] [/S server] [/U username] [/W password] [/O outputfile]

Where:

/L
lists page file data.
/R
changes the page file size.
/B
restarts.
/F
forces a restart.
/P pagefile
is the target page file name.
/M maxsize
is the largest size to which the page file can grow.
/Z minsize
is the minimum size of the page file.
server
is a computer name.
username
is the current user's name.
password
is the password of the current user.
outputfile
is the output file name.


Parallelport.vbs Example

ParallelPort.vbs
Gets the parallel port information for the current computer.
ParallelPort.vbs /S MyMachine2
Gets the parallel port information for the computer MyMachine2.


Parallelport.vbs Syntax

command prompt Open command prompt now.

One Step Parallelport.Vbs [/S server] [/U username] [/W password] [/O outputfile]

Where:

server
is a computer name.
username and password
are the user name and password of the current user.
outputfile
is the output file name.


PointDev.vbs Example

PointDev.vbs
Gets the pointing device information for the current computer.
PointDev.vbs /S MyMachine2
Gets the pointing device information for the computer MyMachine2.


PointDev.vbs Syntax

command prompt Open command prompt now.

One Step PointDev.Vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


Processor.vbs Example

Processor.vbs
gets CPU information for the current computer.
Processor.vbs /S MyMachine2
gets CPU information for the computer MyMachine2.


Processor.vbs Syntax

command prompt Open command prompt now.

One Step Processor.Vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.

Note:

The information reported might vary depending on the type and age of the hardware.


Programgroups.vbs Example

ProgramGroups.VBS
lists program groups on the current computer.
ProgramGroups.VBS /S MyMachine2
lists program groups on the computer MyMachine2.


Programgroups.vbs Syntax

command prompt Open command prompt now.

One Step Programgroups.Vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


ProtocolBinding.vbs Example

ProtocolBinding.vbs
gets the binding configuration for the current computer.
ProtocolBinding.vbs /S MyMachine2
gets the binding configuration for the computer MyMachine2.


ProtocolBinding.vbs Syntax

command prompt Open command prompt now.

One Step ProtocolBinding.Vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


Ps.vbs Example

Ps.vbs

lists all properties on the local computer.

Ps.vbs /S MyMachine

lists the names and process IDs of all processes currently running on the computer MyMachine.


Ps.vbs Syntax

command prompt Open command prompt now.

One Step PS.Vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


PsTop.vbs Example

Pstop.vbs

lists all processes by CPU usage on the local computer.

Pstop.vbs /S MyMachine

lists all processes currently running on the computer MyMachine by CPU usage.


PsTop.vbs Syntax

command prompt Open command prompt now.

One Step PSTop.Vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


Query.vbs Example

Query.Vbs /S:MyMachine /FROM:Win32_Process /P

lists the names of all available properties of a Win32_Process.

Query.Vbs /S:MyMachine /P:Name:10 /P:ProcessId:10 /SORT:A:2
 /FROM:Win32_Process /where:"processid>100"
lists the names and process IDs of all jobs currently running on the computer MyMachine and sorts the result so the process IDs are listed in an ascending order.
Query.Vbs /S:MyMachine /P:* /SORT:A:2 /FROM:Win32_Process
 /where:"processid>100"
lists all properties of all jobs currently running on the computer MyMachine and sorts the results so the second column is listed in an ascending order.


Query.vbs Syntax

command prompt Open command prompt now.

One Step Query.Vbs [/S:server] [/N:namespace] [/P:property1[:width1] [/P:property2[:width2]]...] [/D:width] /FROM:class [/WHERE:criteria] [/SORT:A | D[:num] | N] [/O:outputfile] [/U:username] [/W:password] [/F]

One Step Query.Vbs [/S:server] [/N:namespace] /FROM:class [/O:outputfile] [/U:username] [/W:password] [/P]

Where:

server
is a computer name.
namespace
is a namespace string.
property1, property2, …
are the properties to be retrieved.
width1, width2, …
are the widths of columns used to display values of the corresponding properties.
width
is the default width of each column. The default value is 15.
class
is the name of a WMI class.
criteria
is the criteria of the search.
A | D | N
sorts a column ascending, descending or does no sorting.
num
is the column number of the column to be sorted.
outputfile
is the output file name.
username and password
are the user name and password of the current user.
/P
lists the names of all properties of a process.
/F
uses flush output.


RegConfig.vbs Example

RegConfig.vbs

lists the registry configuration on the current computer.

RegConfig.vbs /S MyMachine2

lists the registry configuration on the computer MyMachine2.

RegConfig.vbs /P 40

changes the proposed size of the registry to 40 MB on the current computer.


RegConfig.vbs Syntax

command prompt Open command prompt now.

One Step RegConfig.Vbs [/S server] [/O outputfile] [/U username] [/W password] [/P proposedsize]

Where:

server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.
proposedsize
is the new proposed size for the registry.


Restart.vbs Example

Restart.Vbs /S MyMachine /Q /F
Forcibly shuts down the computer MyMachine, closing all applications and losing unsaved data.
restart.Vbs /S MyMachine /L /T:30
Waits 30 seconds and then logs off the current user from the computer MyMachine.


Restart.vbs Syntax

command prompt Open command prompt now.

One Step Restart.Vbs /S machine /L | R | P | Q [/T:xx] [/U username] [/W password] [/O outputfile] [/F]

Where:

/S machine
is the name of the local or remote computer (required).
/L | R | P | Q
is the operation to be performed on the specified computer (required).

Where:

/L
performs logoff.
/R
performs restart.
/P
performs poweroff.
/Q
performs shutdown.
/T:xx
sets the time until the specified operation begins, in seconds. If this parameter is omitted, the operation is performed immediately.
username
is the current user's name.
password
is the password of the current user.
outputfile
is the output file name.
/F
forces running applications to close.

Caution

The /F parameter causes Windows 2000 to forcibly close applications with open files and unsaved data. This will result in a loss of all unsaved data.


SchemaDiff.vbs Examples

Schemadiff.vbs /s:zodiac.antipodes.mydomain.microsoft.com
Compares the schema of the domain of the currently logged on user to the schema of the domain specified in /s.

Output

SCHEMADIFF.VBS    Compares schema on two different domains.

Src Schema Version: 12
Dst Schema Version: 12
Comparing classes
classRegistration systemMayContain mismatch
Missing Class mS-DirSync-RetryList
Missing Class mS-DirSync-Server
Missing Class mS-DirSync-Session
Missing Class mS-DirSync-WriteLog
user systemMayContain mismatch
Comparing attributes
Missing Attribute cOMUniquePackageId
Missing Attribute executionContext
Missing Attribute fileExtension
Missing Attribute mimeTypesUnused
Missing Attribute dLMemRejectPermsBL
Missing Attribute dLMemSubmitPermsBL
Missing Attribute maintainAutoReplyHistory
Missing Attribute taggedCertificate
Missing Attribute homeFax
Missing Attribute personalMobile
Missing Attribute oSVersion
** Schema Mismatch


SchemaDiff.vbs Syntax

command prompt Open command prompt now.

One Step schemadiff.vbs /U:username /W:password] /S:server [/F:filename] [/Q]

Where:

username
is the user name for the destination domain.
password
is the password for the destination domain.
server
is the name of the destination domain controller.
filename
is a valid file name for the output file (optional).
/Q
suppresses output.


ScsiController.vbs Example

SCSIController.vbs
gets the SCSI controller information for the current computer.
SCSIController.vbs /S MyMachine2
gets the SCSI controller information for the computer MyMachine2.


ScsiController.vbs Syntax

command prompt Open command prompt now.

One Step ScsiController.Vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


SerialPort.vbs Example

SerialPort.vbs
lists the computer's serial port configurations for the current computer.
SerialPort.vbs /S MyMachine2
lists the computer's serial port configurations for the computer MyMachine2.


SerialPort.vbs Syntax

command prompt Open command prompt now.

One Step SerialPort.Vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


Service.vbs Example

Service.Vbs /L /S MyMachine
lists all Services available on the computer MyMachine.
Service.Vbs /G /N SNMP /S MyMachine
starts the SNMP Service on the computer MyMachine.


Service.vbs Syntax

command prompt Open command prompt now.

1. To list available services

One Step Service.vbs /L [/S server] [/U username] [/W password] [/O outputfile]

2. To start, stop, remove, list dependencies, or set the startmode of a service

One Step Service.vbs /G | /X | /R | /D | /M StartMode /N service [/S server] [/U username] [/W password] [/O outputfile]

3. To install a service

One Step Service.vbs /I /E execname /N service [/C DisplayName] [/S server] [/U username] [/W password] [/O outputfile]

Where:

/L
lists services on a computer.
/D
lists service dependencies.
/G
starts services on a computer.
/X
stops services on a computer.
/M
sets the service mode.
/I
installs a service.
/E
is the full path and filename of the service.
StartMode
is the service startup setting.
Service
is the name of the service to be administered.
DisplayName
is the service name that appears in the listing.
server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


Share.vbs Example

Share.Vbs /L /S MyMachine

lists all Shares on the computer MyMachine.

Share.Vbs /D /N MyShare /S MyMachine

deletes MyShare from the computer MyMachine.

Share.Vbs /C /N MyShare /p C:\Scratch /T Disk /C "Scratch directory" /S MyMachine

creates MyShare on the computer MyMachine.


Share.vbs Syntax

command prompt Open command prompt now.

Use the following syntax to list directory shares on a computer.

One Step Share.Vbs /L [/S server] [/O outputfile] [/U username] [/W password]

Use the following syntax to create a directory share on a computer:

One Step Share.Vbs /C /N name /P path [/T type] [/V description] [/S server] [/O outputfile] [/U username] [/W password]

Use the following syntax to delete a directory share from a computer:

One Step Share.Vbs /D /N name [/S server] [/O outputfile] [/U username] [/W password]

Where:

/L
lists all shares on a computer.
/C
creates a share on a computer.
/D
deletes a share on a computer.
name
is the name of a share to be created or deleted.
path
is the path of the share to be created.
type
is the type of the share to be created. Must be one of Disk, Printer, IPC, and Special.
description
a description for the share to be created.
server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


SoundDevice.vbs Example

SoundDevice.vbs

lists the sound device properties for the current computer.

SoundDevice.vbs /S MyMachine2

lists the sound device properties for the computer MyMachine2.


SoundDevice.vbs Syntax

command prompt Open command prompt now.

One Step SoundDevice.Vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


Startup.vbs Example

Startup.VBS
lists startup programs on the current computer.
Startup.VBS /S MyMachine2
lists startup programs on the computer MyMachine2.


Startup.vbs Syntax

command prompt Open command prompt now.

One Step Startup.Vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


Subnet_ops.vbs Example

subnet_op -l
lists the subnet information for the current computer.
subnet_op -a -n 1.0.0.0/8
adds the specified subnet object.
subnet_op -a -n 1.0.0.0/8 -p USA/MAIN/27
adds the specified subnet object and sets its location property to USA/MAIN/27.
subnet_op -a -n 1.0.0.0/8 -p USA/MAIN/27 -s Default-First-Site-Name
adds the specified subnet object, sets its location property to USA/MAIN/27, and sets the site name property to Default-First_Site-Name.
subnet_op -d -n 1.0.0.0/8
deletes the specified subnet object.
subnet_op -d -n all
deletes all subnet objects from the current domain.
subnet_op -c -i 157.59.16.32 -m 255.255.252.0
calculates the DS name of the specified IP address and subnet mask.


Subnet_ops.vbs Syntax

command prompt Open command prompt now.

Use the following syntax to add a subnet object:

One Step Subnet_ops.vbs -a [-n subnet-name] [-s site-name] [-p location] [-i IPaddress] [-m SubnetMask]

Use the following syntax to delete a subnet object:

One Step Subnet_ops.vbs -d -n subnet-name | all

Use the following syntax to list subnet objects or display command line help:

One Step Subnet_ops.vbs -l | -?

Use the following syntax to convert an IP Address and subnet mask to DS name:

One Step Subnet_ops.vbs -c [-i IPaddress] [-m SubnetMask]

Where:
-a
creates the specified subnet object in the current domain.
-d
deletes the specified subnet object, use 'all' for subnet-name to delete all subnets.
-l
lists all the subnet objects in the current domain.
-c
converts the given IP address and subnet mask to a DS object name.
-p location
sets the location property of the subnet object to be created to the value specified in location.
-?
displays command usage.


SystemAccount.vbs Example

SystemAccount.vbs

gets the system account configuration for the current computer.

SystemAccount.vbs /S MyMachine2

gets the system account configuration for the computer MyMachine2.


SystemAccount.vbs Syntax

command prompt Open command prompt now.

One Step SystemAccount.Vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


TapeDrive.vbs Example

TapeDrive.vbs

gets the tape drive configuration for the current computer.

TapeDrive.vbs /S MyMachine2

gets the tape drive configuration for the computer MyMachine2.


TapeDrive.vbs Syntax

command prompt Open command prompt now.

One Step TapeDrive.Vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


Thread.vbs Example

Thread.vbs
lists the threads running on current computer
Thread.vbs /S MyMachine2
lists the threads running on the computery MyMachine2


Thread.vbs Syntax

command prompt Open command prompt now.

One Step Thread.Vbs [/S server] [/O outputfile] [/U username] [/W password]

Where:

server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.


UserAccount.vbs Example

UserAccount.vbs

gets the user account configurations for the current computer.

UserAccount.vbs /D MyDomain /B

gets the disabled user account configurations for domain MyDomain

Note:

This script might run slowly on large networks and WANS. If necessary use one of the filter switches.


UserAccount.vbs Syntax

command prompt Open command prompt now.

One Step UserAccount.vbs [/D domain] [/N username] [/L] [/B] [/S server] [/U username] [/W password] [/O outputfile]

Where:

/D domain
filters by the domain specified in domain.
/U username
filters by the user specified in username.
/L
filters by locked out accounts.
/B
filters by disabled accounts.
server
is a computer name.
outputfile
is the output file name.
username and password
are the user name and password of the current user.

Note:y

This script may run slowly on large networks and WANS. If necessary use one of the filter switches.


UserGroup.vbs Example

USERGROUP.VBS WinNT:\\MyDomain\administrators \a:WinNT:\\MyDomain2\user1
adds user1 of domain MyDomain2 to the administrators group of domain MyDomain.
USERGROUP.VBS WinNT:\\MyDomain\administrators \a:WinNT:\\MyDomain2\user1 /D
deletes user1 of domain MyDomain2 from the administrators group of domain MyDomain.


UserGroup.vbs Syntax

command prompt Open command prompt now.

One Step UserGroup.vbs grouppath </A:userpath | /I:inputfile>[/U:username] [/W:password] [/Q]

Where:

grouppath
is the ADsPath of a group.
userpath
is the ADsPath of a user to be added to the group or deleted from the group.
inputfile
is the input file name.
username and password
are the user name and password of the current user.
/Q
suppresses all output messages.