Tag Archives: task sequence

ConfigMgr Task Sequence with OSD Options Chooser and computer OU move

The OSD Options Chooser will display an option chooser box during OSD when a computername starts with MININT or MINWINPC (unknown computers). The user can type a computername and choose in which Active Directory OU the computer will be placed during the installation. It will set a Task Sequence variable OSDDepartment which will be used in the Task Sequence to move a computer to another OU.
When the computername doesn’t start with MININT or MINWINPC the Options Chooser won’t pup-up.

In this example the OSD Option Chooser will ask for a computer name and gives 4 computer type choices. The installation will be un-anttended and will close when the computername does NOT start with MININT or MIN-WINPC.

1. Create a source directory and place the two file with the name:
• OSDOptionsChooserv3.hta
• OpenDesktop.vbs

You can find the source at the end of this page.

2. Check the code in the: OSDOptionsChooserv3.hta

3. Check the code in the: OpenDesktop.vbs
Change the values in the .vbs

4. Create a Configuration Manager Package and deploy it to the distribution points.
BLS0122 OSD Options Chooser

5. Open the boot image and add the Optional Component:
HTML (WinPE-HTA)
deploy this boot image to the distribu-tion points.

6. Open a Task Sequence and add the OSD Option Chooser package right after Partitioning the disks.
This first part will show the Option Chooser for unknown computers (MININT or MINWINPC).

7. The second part will move the computer to the OU which was specified in part one.

8. Open the Options tab and ad a Task Sequence Variable OSDDepartment.

__________________________________________________________
I included one zip file with the OSDOptionChooser and OpenDesktop.vbs script we used within our company.

We added extra lines to the original script:
window.close
and
SysVarReg.RegWrite “HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Hostname”, sTSMachineName

And added parts for setting the Task Sequence variable OSDDepartment (OU options).
We deleted some parts we didn’t need.
####################################################################

####################################################################

you can find the original OSD Options Chooser script Created by Nick Moseley at http://t3chn1ck.wordpress.com

Advertisements

Move a computer to a different OU within a ConfigMgr 2012 SP1 Task Sequence. #yam

In the past we used a vbs-script in a ConfigMgr Task Sequence to detect if a computer was already added to the Active Directory. If it was detected in Active Directory it was moved to a OU with less policies. In this example I will create a System Center Orchestrator (SCOrch) Runbook which will detect if a computer is already an Active Directory member, and if so it will be moved to another predefined OU.

Prerequisites

  • A System Center Configuration Manager 2012 SP1 infrastructure.
  • A System Center Orchestrator 2012 installation.
  • The Microsoft Deployment Toolkit 2012 Update 1 integration.
  • The Active Directory Integration Pack.
  • A Nework Access Account which has “Orchestrator User” credentials.
  • An AD service account with at least Account Operators credentials.

Configure the Active Directory Integration Pack

  • Start the System Center 2012 Orchestrator Runbook Designer.
  • Go to Options and change the SCORCH Dev – Active Directory Prerequisite Configuration.
  • Click on Add and type a Name
  • fill in the UserName, Password and the Domain name of the AD Account with Account Operators credentials
  • Click Finish.

Create a new Runbook

  • Start the System Center 2012 Orchestrator Runbook Designer
  • Create a new Runbook and rename it to ConfigMgr-TS-MoveComputerToDeploy
  • Add Initialize Data
  • Add Get Object DistiguishedName
  • Add Move AD Object
  • Create two links,
    • one between Initialize Data and Get Object Distiguished Name and
    • one between Get Object Distinguished Name and Move AD Object.
  • Open the Initialize Data Properties and click on Add.
  • Dubbelclick the Parameter 1 Activity data and change the name to Computer Name.
  • Click on Finish.
  • Open the Get Object DistinguishedName Properties.
  • Select the AD Connection Credentials under the Configuration Name properties.
  • type the DomainName.
  • Right click the field next to the Object Name Properties and select Subscribe > Published Data and select the Computer Name Activity.
  • Select computer from the drop down box under the Object Class
  • Click Finsih.
  • Open the Move AD Object Properties
  • Select the AD Connection Credentials under the Configuration Name properties.
  • Right click the field next to the Source Object LDAP Path and select Subscribe > Published Data
  •  In the Published Data, select Get Object DistinguishedName, and then select Object_LDAP_Path.
  • Click OK.
  • Right click the white field next to the Destination Container OU LDAP Path
  • And fill in the LDAP path of the Destination OU. It should look something like this: LDAP://OU=Deploy,OU=SUBOU,OU=SUBOU,DC=value,DC=kamman,DC=info
  • Click Finish.

Test de Runbook

  • Start the Runbook Tester.
  • Type the name of a machine which is a Active Directory member.
  • Step through the runbook and see if the log gifs you any errors.
  • If no errors are displayed Check In this new Runbook.

Add the Runbook to the Configuration Manager Task Sequence

  • Start the System Center 2012 Configuration Manager console
  • Go to Software Library | Operating Systems | Task Sequences
  • Create a new or edit an existing Task Sequence.
  • Add the MDT 2012 Deployment Toolkit Package to the task sequence.
  • Add the MDT/Execute Runbook step and fill in the Name, Orchestrator Server and Browse to the Runbook Move Computer.
  • Select Specify explicit runbook parameters and type next to Computer Name the variable %_SMSTSMachineName%.
  • Click Apply.