SCCM OSD Set OU Name via .VBS

Page content

Overview

This script will set AD OUs during OSD Based off starting characters for the computer name.

Its set to check the first character for the computer name, however this can changed to a higher count by changing the sComputerName Variable.

Script

SCCM Setup

You will need to create a package in SCCM, this package will be called later in the task sequence.

  1. In the task sequence click add -> Run Command Line
  2. Check Package: (Select your package you created).
  3. Command line: cscript.exe "setOUname.VBS"