Tag Archives: VBScript

VBScript: Create Shortcut (.lnk) File

Following is a starting point for a script which will create a standard shortcut on the desktop.

Read more

VBScript: Recursively Delete Files

This script will attempt to delete all files in a particular location, including subfolders, but silently continue on error.

Read more

VBScript: Get a computer’s IP address(es)

Returns a string of addresses, separated by pipe (|), with a leading pipe: |192.168.0.12|172.16.31.64|10.1.1.2

Read more

VBScript: Get Script’s Location

The scriptLocation variable will contain the path to executing script. 12Set objFSO = CreateObject("Scripting.FileSystemObject") scriptLocation = objFSO.GetFile(Wscript.ScriptFullName).ParentFolder

Read more

VBScript: Reset a local user password on all PCs in a domain

This script can be used to set a password on a specific local account on all PCs in an Active Directory OU. After execution is complete, there will be two files in the same directory with the script: RETRY.txt contains names of computer that are unreachable RESULTS-YYYYMMDD-HHmm.txt log of result of each PC When executed, [...]

Read more

VBScript: Exchange Storage Group status

This script will query one or more Exchange 20003 servers and return the status of each information store.

Read more

VBScript: Reboot Script

This script will gather a list of PCs from Active Directory and send a reboot command to each one. If a user is logged on, a message and timer will be displayed. If no user is logged on, then the PC will reboot immediately. A list of exempt PCs can be defined (i.e. servers).

Read more

VBScript: Read INI Files

This is a handy function which will enable you to read an .ini file. This is useful for separating configuration options from a script.

Read more

VBScript: “Include”

Since there is no Include in VBScript, this is a comparable implementation which makes use of ExecuteGlobal.

Read more