Tuesday, October 1, 2013

Step: 1.3: Evaluating Build type

Evaluate build type will be initiated only if the following conditions are met;
In Evaluate build type step we will use OSD++ utility to populate build options to the technicians. OSD++ will create custom task sequence varialbes based on the chosen options. This custom task sequence variables can be created and modified using .xml files. OSD++ source files and documentation can be found at http://myitforum.com/cs2/blogs/jsandys/pages/osdplusplus.aspx

Create a Package (Named as OSDPlusPlus) with 3 different xml files (Migration.xml, Newbuild.xml and OSDPlusAll.xml), OSDPlusPlus.exe and OSDPlusPlus64.exe
If  you are building 64 bit OS then use OSDPlusPlus64.exe executable.
I have provided the sample XML files as below. You can create your own XML based on the requirements. You can find more help in using OSD++ and creating XML config files in above link.
Migration.xml: 
****************************************************************
<?xml version="1.0" encoding="utf-8"?>
<OSDPlus>
  <GetReg hive="HKLM" key="SOFTWARE\Microsoft\Windows NT\CurrentVersion" value="CurrentVersion" varname="CurrentVersion" />
  <GetWmi namespace="root\cimv2" class="Win32_ComputerSystem" property="model" varname="csmodel" />
    <GetUser title="Venu Singireddy's Blog" subtitle="Please choose your options to deploy Windows 7" icon="64">
     <Listbox prompt="Build type - Migration" icon="47" varname="Buildtype">
           <Option default="Yes" alt1="Mig">Migration</Option>
           <Option default="Yes" alt1="NEW">New Build</Option>
     </Listbox>
     <Listbox prompt="Please choose an Organisation Unit" icon="30" varname="OU">
           <Option alt1="BU1">Business Unit 1</Option>
           <Option alt1="BU2">Business Unit 2</Option>
           <Option alt1="BU3">Business Unit 3</Option>
   
     </Listbox>
           <Listbox prompt="Please pick your Time Zone" icon="26" varname="TZone">
           <Option alt1="ACSTA">ACST - Adelaide</Option>
           <Option alt1="ACSTD">ACST - Darwin</Option>
           <Option alt1="AESTB">AEST - Brisbane</Option>
           <Option alt1="AESTS">AEST - Sydney</Option>
     </Listbox>
    
  </GetUser>
<PutTSVar varname="Buildtypealt1" tsvar="TSBuild"/>
<PutTSVar varname="OUalt1" tsvar="TSOU"/>
<PutTSVar varname="TZonealt1" tsvar="TSTZone"/>
 </OSDPlus>
******************************************************
NewBuild.xml:
******************************************************
<?xml version="1.0" encoding="utf-8"?>
<OSDPlus>
  <GetReg hive="HKLM" key="SOFTWARE\Microsoft\Windows NT\CurrentVersion" value="CurrentVersion" varname="CurrentVersion" />
  <GetWmi namespace="root\cimv2" class="Win32_ComputerSystem" property="model" varname="csmodel" />
   <GetUser title="Venu Singireddy's Blog" subtitle="Please choose your options to deploy Windows 7" icon="64">
     <Listbox prompt="Build type - Migration" icon="47" varname="Buildtype">
        <Option default="Yes" alt1="NEW">New Build</Option>
     </Listbox>
     <Listbox prompt="Please choose an Organisation Unit" icon="30" varname="OU">
           <Option alt1="BU1">Business Unit 1</Option>
           <Option alt1="BU2">Business Unit 2</Option>
           <Option alt1="BU3">Business Unit 3</Option>
     </Listbox>
           <Listbox prompt="Please pick your Time Zone" icon="26" varname="TZone">
           <Option alt1="ACSTA">ACST - Adelaide</Option>
           <Option alt1="ACSTD">ACST - Darwin</Option>
           <Option alt1="AESTB">AEST - Brisbane</Option>
           <Option alt1="AESTS">AEST - Sydney</Option>    
     </Listbox>
  </GetUser>
<PutTSVar varname="Buildtypealt1" tsvar="TSBuild"/>
<PutTSVar varname="OUalt1" tsvar="TSOU"/>
<PutTSVar varname="TZonealt1" tsvar="TSTZone"/>
 </OSDPlus>
*******************************************************************
OSDPlusAll.xml:
**********************************************************************
<?xml version="1.0" encoding="utf-8"?>
<OSDPlus>
  <GetReg hive="HKLM" key="SOFTWARE\Microsoft\Windows NT\CurrentVersion" value="CurrentVersion" varname="CurrentVersion" />
  <GetWmi namespace="root\cimv2" class="Win32_ComputerSystem" property="model" varname="csmodel" />
  
  <GetUser title="Venu Singireddy's Blog" subtitle="Please choose your options to deploy Windows 7" icon="64">
     <Listbox prompt="Please choose Build type" icon="47" varname="Buildtype">
           <Option default="Yes" alt1="NEW">New Build</Option>
           <Option alt1="REB">Re-Build</Option>
     </Listbox>

     <Listbox prompt="Please choose an Organisation Unit" icon="30" varname="OU">
           <Option alt1="BU1">Business Unit 1</Option>
           <Option alt1="BU2">Business Unit 2</Option>
           <Option alt1="BU3">Business Unit 3</Option>
</Listbox>
     <Listbox prompt="Please pick your Time Zone" icon="26" varname="TZone">
           <Option alt1="ACSTA">ACST - Adelaide</Option>
           <Option alt1="ACSTD">ACST - Darwin</Option>
           <Option alt1="AESTB">AEST - Brisbane</Option>
           <Option alt1="AESTS">AEST - Sydney</Option>
     </Listbox>
  </GetUser>
<PutTSVar varname="Buildtypealt1" tsvar="TSBuild"/>
<PutTSVar varname="OUalt1" tsvar="TSOU"/>
<PutTSVar varname="TZonealt1" tsvar="TSTZone"/>

 </OSDPlus>
*******************************************************
OSD++ Migration action will be initiated when following conditions are met;
Win7Supported equals TRUE
C:\Windows\System32\Build notExist
SMSTSMediaType notequals OEMMedia
Note: During the normal build process, one of the steps in the task sequence is to create a Build folder under C:\Windows\System32\ to copy the change logs. We can use that folder existence to identify the machines using a proper image or not.
Create OSD++ Migration task by adding a Run Command Line step and add OSDPlusPlus64.exe /Conf:Migration.xml on the command line, Select Disable 64-bit file system redirection, Select package box then browse to the package OSDPlusPlus.
On launch of OSD++, it will display the following screen;
Choose the build type;
So here, the build engineer has 2 options to choose from (as above). If data is required from the machine then the engineer can select Migration (Which runs the USMT – explained in later articles). If nothing need to be backed up from the machine and prepare as a brand new machine then choose New build.
In New Build option;
-          Data won’t be migrated
-          Local drives will be formatted and re-partitioned as per task sequence requirements
In Migration option:
-          Data will be copied to a SMP or Network share
-          Drive will be formatted and partitioned
-          Data will be restored
Choose the business unit;
Based on the business unit selection, you can add the computers in specific OU in AD or deploy custom applications based for that division.
Choose the time zone;
If you are designing a SOE for global users or a countries where you have different time zones, this option is useful. Based on the choice, the task sequence will apply particular time zone package (Explained here)which changes the system time

OSD++ Rebuild action will be initiated if following conditions are met;

Create OSD++ Rebuild task by adding a Run Command Line step and add OSDPlusPlus64.exe /Conf: OSDPlusAll.xml on the command line, Select Disable 64-bit file system redirection, Select package box then browse to the package OSDPlusPlus.

On launch of OSD++, it will display the following screen;
Choose the build type;
On OSD++ Rebuild, the build engineer has 2 options to choose from (as above).
New Build: As the name says, this action will prepare the machine as a new machine. No data migration or back will be performed. Hard drive will be formatted and applied new image.
In New Build option;
-          Data won’t be migrated
-          Local drives will be formatted and re-partitioned as per task sequence requirements

Re-Build: Re-build will perform an offline USMT using hard linking. When a PC built using a proper corporate image and for whatever reason that PC need to be rebuild without losing user data then the re-build will do the task exactly as required.
In Re-Build option;
-          Local drivers won’t be formatted
-          Local drives will be wiped
-          Data won’t be migrated to SMP or a network share
-          Data will be stored on the local drive using hard linking
Choose Business units and Choose Time zones options are same as explained above.

OSD++ New Build action will be initiated if following conditions are met;

Create OSD++ New Build task by adding a Run Command Line step and add OSDPlusPlus64.exe /Conf: NewBuild.xml on the command line, Select Disable 64-bit file system redirection, Select package box then browse to the package OSDPlusPlus.

On launch of OSD++, it will display the following screen;

Choose the build type;
On OSD++ New Build, the build engineer has only one options to choose from (as above).
In New Build option;
-          Data won’t be migrated
-          Local drives will be formatted and re-partitioned as per task sequence requirements
Choose Business units and Choose Time zones options are same as explained above.
Now the all in one task sequence looks as below

Click here for complete list of tasks for SCCM OSD All in one task sequence.
Click here for SCCM OSD All in one task sequence Visio diagram.

1 comment: