VBScript How-to guides and examples

Arguments Command Line arguments.
Loop Statements Do-Loop, FOR-Next, For Each, While.
Operators Math, comparison, logical AND OR NOT.
Variables Define VBScript variables.
Array Variables VBScript array variables.
Built-in Constants  
IsBlank Function to find Null/Empty values.
Functions Write a VBScript function.
Math functions Cos,Sin,Log,Fix,VariableSubtype.
WScript properties  StdIn, StdOut, StdErr, Timeout, version
Naming Naming convention for VBScript.

VB Scripts and functions:

GetDate Return the current Year/Month/Day and time.
DateTime Get Date, Time and daylight savings.
Delolder Delete files older than N days.
Easter Function to calculate the date of Easter.
PrintSave Save and Restore Windows Printer Connections.
qchange Edit network printer connections.
Pin/UnPin Pin items to the Start Menu.
SearchAD Search AD for Users, Computers or groups.
Move-Object Move an AD object (User, Group, computer etc) to a different OU.
ListComputers  List all computers.
ComputerInfo List properties of a Computer. (as shown in ADUC)
ListUsers List all users.
UserInfo List properties of a User. (as shown in ADUC)
UpdateUsers Update a property in AD for a group of users.
Uname List a users First and Last name.
isMember Function to determine group membership.
Localadmins List local administrators across a network domain.

Reference / How to

Run a script How to run a VB script. (.vbs)
Elevate Run with elevated permissions (As Admin).
On Error Error handling.
Error Codes VB Script errors.
Hybrid Hybrid Batch and VBScript.
MapDrive Map a Drive letter to a network file share.
MapDrivePersistent  Map a Drive letter to a network file share. (persistent)
RoamingProfile Cleardown files to improve logon and logoff times.
Replace Find and replace text.

See also: Websites and Books for VBScript.


 
Copyright © 1999-2022 SS64.com
Some rights reserved