VBScript for Windows 2003 – Scope

What can you do with VBScript in Windows 2003?

One of the easiest predictions to make is that Windows server scripting will be big in the year 2004.

Just as you may have had the choice of learning German or French in school, so you have the choice of VBScript or JScript for controlling your Windows 2003 servers and networks.

So what can you do with VBScript (JScript)?

  • Create Users in Active Directory
  • Map network drives and printers in logon scripts
  • Interrogate Event Logs
  • Make changes to the Registry
  • Produce reports on the operating system, for example memory and disk usage.
  • Create Mailbox-enabled users for use with Exchange

Create Users in Active Directory

There are at least 6 ways of creating users in Active Directory.  I suggest a ‘killer’ use for a VBScript is where you have hundreds or thousands of new people joining your domain.  Using this method relies on the user properties being in a spreadsheet.

Here are the other methods along with an word about their personality!

  1. VBScript – Wise professor, very versatile.
  2. CSVDE – Solid versatile.
  3. LDIFDE – Fringe or ‘Special teams player’.
  4. DS Add – New kid on the street.
  5. ADC agreements – The specialist. Here is a tool for migrating from Exchange 5.5 to Active Directory.
  6. Active Directory Users and Computers – A reliable workhorse, but a bit of a plodder where you have lots of accounts to create.

Map network drives and printers in logon scripts

Once you realize that the network can be an ‘object’, then you see how a VBScript can manipulate shares and map them to local drive letters.  What you learn for network drives, you can apply to printers.

I have a whole section on Logon Scripts powered by VBScripts.

Interrogate Event Logs

Scripts are ideal for querying hundreds or even thousands of records looking for a particular Event ID number.

Making Changes to the Registry

Changing the registry can be dangerous so first test any registry VBScripts on a test machine.

Guy Recommends: Permissions Analyzer – Free Active Directory ToolFree Permissions Analyzer for Active Directory

I like thePermissions Monitor because it enables me to see quickly WHO has permissions to do WHAT.  When you launch this tool it analyzes a users effective NTFS permissions for a specific file or folder, takes into account network share access, then displays the results in a nifty desktop dashboard!

Think of all the frustration that this free utility saves when you are troubleshooting authorization problems for users access to a resource.  Give this permissions monitor a try – it’s free!

Download Permissions Analyser – Free Active Directory Tool

Produce reports on the operating system, for example disk usage.

This is a job for WMI instrumentation.  Let me explain.  VBScript can gain access to the operating system.  A simple statement can open up all the underlying objects and their properties, for example Physical Memory, USB hub.  I was amazed there were almost 1,000 object that you can interrogate by a VBScript opening the Windows Management Interface (WMI).

Create Mailbox-enabled users.

You can use VBScript to create brand new users with mailboxes, or you can use a different script to add mailboxes to existing users.

Download your eBook: Creating Exchange mailboxes with VBScript- only $6.25

Creating Exchange mailboxes with VBScriptCreate mailbox-enabled users.  Add mailboxes to existing users in Active Directory.   Step-by-step instructions on how to use VBScript to generate users with mailboxes.  Combine VBScripts with CSVDE to import users from spreadsheets.

You get a printer friendly version with copy enabled, and no expiry date.  It runs to 55 A4 pages.

 


See Also

 *


Custom Search

Site Home

Guy Recommends: WMI Monitor for PowershellSolarwinds WMI Monitor

Windows Management Instrumentation (WMI) is most useful for PowerShell scripting.

SolarWinds have produced this Free WMI Monitor to take the guess work out of which WMI counters to use for applications like Microsoft Active Directory, SQL or Exchange Server.

Download your free copy of WMI Monitor

Author: Guy Thomas Copyright © 1999-2017 Computer Performance LTD All rights reserved.

Please report a broken link, or an error to: