GUID Collection/Account Prestaging VBScript Example


GUID Collection Tool

This tool will assist you in collecting GUIDs from your lab and faculty/staff computers. It is a simple VB Script that creates a CSV file per machine and makes a single entry into a cumulative CSV file in a ‘collect’ directory. After running the script on each of your target computers you will be able to take the contents of the cumulative CSV file and easily format it to the layout required by the pre-staging tool (below).

Example output file (guid_list.csv):

The code:

Account Prestaging Tool

This tool will allow you to pre-stage managed computers into the WolfTech AD OU of your choice (assuming you have the necessary permissions to the OU etc.) for use with RIS from an Excel spreadsheet. The VB Script (PrestagRISClnt.vbs) provided below is a modified version of a script provided by Microsoft as part of their Windows Server 2003 Deployment Kit in the Sample_RIS_Scripts.zip file found here:

Windows Server 2003 Deployment Kit

The script has been modified to accept one additional argument – a container (OU) of your choice to stage the computers. The script, as provided by Microsoft, will only stage the computers into the default ‘Computers’ AD group. The Computer Account Prestaging Tool includes a sample excel file containing a list of computers & a batch file that will run the script with the necessary arguments.

Instructions for using the Pre-staging tool:

  1. Copy the code below, saving it as PrestagRISClnt.vbs, download the remaining components and unzip the them to a WinXP computer in the WolfTech domain w/the following prerequisites:
    1. .NET Framework 2.0
    2. Microsoft Office (Excel) – the script uses an Excel COM object
  2. Register the GUIDConvert.dll (see Cannot prestage RIS Clients in Active Directory by using the Windows Server 2003 Deployment Kit for details):
    1. Run register_guid_dll.bat
    2. If Pre-staging script issues this error:
    3. Try the following command to fix the GUIDConvert.dll registration:
  3. Modify ‘sample_computers.xls’ to a list of computers & corresponding GUIDs that you would like to pre-stage
  4. Modify ‘prestage_sample_computers.bat’ /Server argument to reference the RIS server of your choice. *Note: you can specify /Server:ignore to leave this attribute blank
  5. Modify ‘prestage_sample_computers.bat’ /Container argument to the desired computer staging OU
  6. Run ‘prestage_sample_computers.bat’ to stage the computers in your excel spreadsheet. *Note: The following error message is issued, but the computers are still staged into AD:

The code: