<?xml version="1.0"?>
<sequence version="3.00" name="Build Server2012 R2 Template" description="Orchard Windows 2012 R2 Server build template">
  <group name="WinPreOSInstall" disable="false" continueOnError="false" description="" expand="true">
    <condition>
      <expression type="SMS_TaskSequence_VariableConditionExpression">
        <variable name="Variable">PHASE</variable>
        <variable name="Operator">equals</variable>
        <variable name="Value">PREINSTALL</variable>
      </expression>
    </condition>
    <step type="BDD_Gather" name="Gather local only" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
      <defaultVarList>
        <variable name="GatherLocalOnly" property="GatherLocalOnly">true</variable>
        <variable name="RulesFile" property="RulesFile"></variable>
      </defaultVarList>
      <action>cscript.exe "%SCRIPTROOT%\ZTIGather.wsf"</action>
    </step>
    <group name="New Computer only" disable="false" continueOnError="false" description="" expand="true">
      <condition>
        <expression type="SMS_TaskSequence_VariableConditionExpression">
          <variable name="Variable">DeploymentType</variable>
          <variable name="Operator">equals</variable>
          <variable name="Value">NEWCOMPUTER</variable>
        </expression>
      </condition>
      <step type="BDD_Validate" name="Validate" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
        <defaultVarList>
          <variable name="ImageSize" property="ImageSize">0</variable>
          <variable name="ImageProcessorSpeed" property="ImageProcessorSpeed">800</variable>
          <variable name="ImageMemory" property="ImageMemory">768</variable>
          <variable name="VerifyOS" property="VerifyOS">SERVER</variable>
        </defaultVarList>
        <action>cscript.exe "%SCRIPTROOT%\ZTIValidate.wsf"</action>
      </step>
      <step type="SMS_TaskSequence_PartitionDiskAction" name="Format and Partition Disk (BIOS)" description="" disable="false" continueOnError="false" runIn="WinPEandFullOS" successCodeList="0 3010">
        <condition>
          <expression type="SMS_TaskSequence_VariableConditionExpression">
            <variable name="Operator">notEquals</variable>
            <variable name="Value">True</variable>
            <variable name="Variable">IsUEFI</variable>
          </expression>
        </condition>
        <defaultVarList>
          <variable name="OSDDiskIndex" property="DiskIndex">0</variable>
          <variable name="OSDDiskPartitions1Type" property="OSDDiskPartitions1Type">Recovery</variable>
          <variable name="DONotCreateExtraPartition" property="DONotCreateExtraPartition"></variable>
          <variable name="OSDPartitions0Type" property="Partitions0Type">Primary</variable>
          <variable name="OSDPartitions0FileSystem" property="Partitions0FileSystem">NTFS</variable>
          <variable name="OSDPartitions0Bootable" property="Partitions0Bootable">True</variable>
          <variable name="OSDPartitions0QuickFormat" property="Partitions0QuickFormat">True</variable>
          <variable name="OSDPartitions0VolumeName" property="Partitions0VolumeName">System Reserved</variable>
          <variable name="OSDPartitions0Size" property="Partitions0Size">499</variable>
          <variable name="OSDPartitions0SizeUnits" property="Partitions0SizeUnits">MB</variable>
          <variable name="OSDPartitions0VolumeLetterVariable" property="Partitions0VolumeLetterVariable"></variable>
          <variable name="OSDPartitions1Type" property="Partitions1Type">Primary</variable>
          <variable name="OSDPartitions1FileSystem" property="Partitions1FileSystem">NTFS</variable>
          <variable name="OSDPartitions1Bootable" property="Partitions1Bootable">False</variable>
          <variable name="OSDPartitions1QuickFormat" property="Partitions1QuickFormat">True</variable>
          <variable name="OSDPartitions1VolumeName" property="Partitions1VolumeName">Windows</variable>
          <variable name="OSDPartitions1Size" property="Partitions1Size">99</variable>
          <variable name="OSDPartitions1SizeUnits" property="Partitions1SizeUnits">%</variable>
          <variable name="OSDPartitions1VolumeLetterVariable" property="Partitions1VolumeLetterVariable">OSDisk</variable>
          <variable name="OSDPartitions2Type" property="Partitions2Type">Recovery</variable>
          <variable name="OSDPartitions2FileSystem" property="Partitions2FileSystem">NTFS</variable>
          <variable name="OSDPartitions2Bootable" property="Partitions2Bootable">False</variable>
          <variable name="OSDPartitions2QuickFormat" property="Partitions2QuickFormat">True</variable>
          <variable name="OSDPartitions2VolumeName" property="Partitions2VolumeName">Recovery</variable>
          <variable name="OSDPartitions2Size" property="Partitions2Size">100</variable>
          <variable name="OSDPartitions2SizeUnits" property="Partitions2SizeUnits">%</variable>
          <variable name="OSDPartitions2VolumeLetterVariable" property="Partitions2VolumeLetterVariable"></variable>
          <variable name="OSDPartitions" property="Partitions">3</variable>
          <variable name="OSDPartitionStyle" property="PartitionStyle">MBR</variable>
        </defaultVarList>
        <action>cscript.exe "%SCRIPTROOT%\ZTIDiskpart.wsf"</action>
      </step>
      <step type="SMS_TaskSequence_PartitionDiskAction" name="Format and Partition Disk (UEFI)" description="" runIn="WinPE" successCodeList="0" disable="false" continueOnError="false">
        <condition>
          <expression type="SMS_TaskSequence_VariableConditionExpression">
            <variable name="Operator">equals</variable>
            <variable name="Value">True</variable>
            <variable name="Variable">IsUEFI</variable>
          </expression>
        </condition>
        <defaultVarList>
          <variable name="OSDDiskIndex" property="DiskIndex">0</variable>
          <variable name="OSDDiskPartitions1Type" property="OSDDiskPartitions1Type">Recovery</variable>
          <variable name="DONotCreateExtraPartition" property="DONotCreateExtraPartition"></variable>
          <variable name="OSDPartitions0Type" property="Partitions0Type">EFI</variable>
          <variable name="OSDPartitions0FileSystem" property="Partitions0FileSystem">FAT32</variable>
          <variable name="OSDPartitions0Bootable" property="Partitions0Bootable">True</variable>
          <variable name="OSDPartitions0QuickFormat" property="Partitions0QuickFormat">True</variable>
          <variable name="OSDPartitions0VolumeName" property="Partitions0VolumeName">Boot</variable>
          <variable name="OSDPartitions0Size" property="Partitions0Size">499</variable>
          <variable name="OSDPartitions0SizeUnits" property="Partitions0SizeUnits">MB</variable>
          <variable name="OSDPartitions0VolumeLetterVariable" property="Partitions0VolumeLetterVariable"></variable>
          <variable name="OSDPartitions1Type" property="Partitions1Type">MSR</variable>
          <variable name="OSDPartitions1FileSystem" property="Partitions1FileSystem">NTFS</variable>
          <variable name="OSDPartitions1Bootable" property="Partitions1Bootable">False</variable>
          <variable name="OSDPartitions1QuickFormat" property="Partitions1QuickFormat">True</variable>
          <variable name="OSDPartitions1VolumeName" property="Partitions1VolumeName"></variable>
          <variable name="OSDPartitions1Size" property="Partitions1Size">128</variable>
          <variable name="OSDPartitions1SizeUnits" property="Partitions1SizeUnits">MB</variable>
          <variable name="OSDPartitions1VolumeLetterVariable" property="Partitions1VolumeLetterVariable"></variable>
          <variable name="OSDPartitions2Type" property="Partitions2Type">Primary</variable>
          <variable name="OSDPartitions2FileSystem" property="Partitions2FileSystem">NTFS</variable>
          <variable name="OSDPartitions2Bootable" property="Partitions2Bootable">False</variable>
          <variable name="OSDPartitions2QuickFormat" property="Partitions2QuickFormat">True</variable>
          <variable name="OSDPartitions2VolumeName" property="Partitions2VolumeName">Windows</variable>
          <variable name="OSDPartitions2Size" property="Partitions2Size">99</variable>
          <variable name="OSDPartitions2SizeUnits" property="Partitions2SizeUnits">%</variable>
          <variable name="OSDPartitions2VolumeLetterVariable" property="Partitions2VolumeLetterVariable">OSDisk</variable>
          <variable name="OSDPartitions3Type" property="Partitions3Type">Recovery</variable>
          <variable name="OSDPartitions3FileSystem" property="Partitions3FileSystem">NTFS</variable>
          <variable name="OSDPartitions3Bootable" property="Partitions3Bootable">False</variable>
          <variable name="OSDPartitions3QuickFormat" property="Partitions3QuickFormat">True</variable>
          <variable name="OSDPartitions3VolumeName" property="Partitions3VolumeName">Recovery</variable>
          <variable name="OSDPartitions3Size" property="Partitions3Size">100</variable>
          <variable name="OSDPartitions3SizeUnits" property="Partitions3SizeUnits">%</variable>
          <variable name="OSDPartitions3VolumeLetterVariable" property="Partitions3VolumeLetterVariable"></variable>
          <variable name="OSDPartitions" property="Partitions">4</variable>
          <variable name="OSDPartitionStyle" property="PartitionStyle">GPT</variable>
        </defaultVarList>
        <action>cscript.exe "%SCRIPTROOT%\ZTIDiskpart.wsf"</action>
      </step>
      <step name="Copy scripts" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
        <action>cscript.exe "%SCRIPTROOT%\LTICopyScripts.wsf"</action>
        <defaultVarList>
          <variable name="RunAsUser" property="RunAsUser">false</variable>
          <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
          <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
          <variable name="LoadProfile" property="LoadProfile">false</variable>
        </defaultVarList>
      </step>
    </group>
    <step name="Configure" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
      <action>cscript.exe "%SCRIPTROOT%\ZTIConfigure.wsf"</action>
      <defaultVarList>
        <variable name="RunAsUser" property="RunAsUser">false</variable>
        <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
        <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
        <variable name="LoadProfile" property="LoadProfile">false</variable>
      </defaultVarList>
    </step>
    <step type="SMS_TaskSequence_RunCommandLineAction" name="Enable BitLocker (Offline)" description="" disable="false" continueOnError="true" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
      <action>cscript.exe "%SCRIPTROOT%\ZTIBDE.wsf"</action>
      <defaultVarList>
        <variable name="RunAsUser" property="RunAsUser">false</variable>
        <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
        <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
        <variable name="LoadProfile" property="LoadProfile">false</variable>
      </defaultVarList>
    </step>
    <step type="BDD_InjectDrivers" name="Inject Drivers" description="" disable="false" continueOnError="false" runIn="WinPEandFullOS" successCodeList="0 3010">
      <defaultVarList>
        <variable name="DriverSelectionProfile" property="DriverSelectionProfile">All Drivers</variable>
        <variable name="DriverInjectionMode" property="DriverInjectionMode">AUTO</variable>
      </defaultVarList>
      <action>cscript.exe "%SCRIPTROOT%\ZTIDrivers.wsf"</action>
    </step>
    <step name="Next Phase" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
      <action>cscript.exe "%SCRIPTROOT%\ZTINextPhase.wsf"</action>
      <defaultVarList>
        <variable name="RunAsUser" property="RunAsUser">false</variable>
        <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
        <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
        <variable name="LoadProfile" property="LoadProfile">false</variable>
      </defaultVarList>
    </step>
  </group>
  <group name="Apply OS on Disk" disable="false" continueOnError="false" description="" expand="true">
    <condition>
      <expression type="SMS_TaskSequence_VariableConditionExpression">
        <variable name="Variable">PHASE</variable>
        <variable name="Operator">equals</variable>
        <variable name="Value">INSTALL</variable>
      </expression>
    </condition>
  </group>
  <group name="WinPE_PostOSInstall" disable="false" continueOnError="false" description="" expand="true">
    <condition>
      <expression type="SMS_TaskSequence_VariableConditionExpression">
        <variable name="Variable">PHASE</variable>
        <variable name="Operator">equals</variable>
        <variable name="Value">POSTINSTALL</variable>
      </expression>
    </condition>
    <step name="Copy Scripts" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
      <action>cscript.exe "%SCRIPTROOT%\LTICopyScripts.wsf"</action>
      <defaultVarList>
        <variable name="RunAsUser" property="RunAsUser">false</variable>
        <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
        <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
        <variable name="LoadProfile" property="LoadProfile">false</variable>
      </defaultVarList>
    </step>
    <step name="Configure" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
      <action>cscript.exe "%SCRIPTROOT%\ZTIConfigure.wsf"</action>
      <defaultVarList>
        <variable name="RunAsUser" property="RunAsUser">false</variable>
        <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
        <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
        <variable name="LoadProfile" property="LoadProfile">false</variable>
      </defaultVarList>
    </step>
    <step name="Inject Drivers" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
      <action>cscript.exe "%SCRIPTROOT%\ZTIdrivers.wsf"</action>
      <defaultVarList>
        <variable name="RunAsUser" property="RunAsUser">false</variable>
        <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
        <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
        <variable name="LoadProfile" property="LoadProfile">false</variable>
      </defaultVarList>
    </step>
    <step type="SMS_TaskSequence_RunCommandLineAction" name="Add Windows Recovery (WinRE)" description="" disable="false" continueOnError="false" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
      <action>cscript.exe "%SCRIPTROOT%\ZTIWinRE.wsf"</action>
      <defaultVarList>
        <variable name="RunAsUser" property="RunAsUser">false</variable>
        <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
        <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
        <variable name="LoadProfile" property="LoadProfile">false</variable>
      </defaultVarList>
    </step>
    <step name="Next Phase" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
      <action>cscript.exe "%SCRIPTROOT%\ZTINextPhase.wsf"</action>
      <defaultVarList>
        <variable name="RunAsUser" property="RunAsUser">false</variable>
        <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
        <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
        <variable name="LoadProfile" property="LoadProfile">false</variable>
      </defaultVarList>
    </step>
    <step type="SMS_TaskSequence_RebootAction" name="Restart computer" description="" disable="false" continueOnError="false" runIn="WinPEandFullOS" successCodeList="0 3010">
      <defaultVarList>
        <variable name="Message" property="Message"></variable>
        <variable name="MessageTimeout" property="MessageTimeout">60</variable>
        <variable name="Target" property="Target"></variable>
      </defaultVarList>
      <action>smsboot.exe /target:WinPE</action>
    </step>
  </group>
  <group name="State Restore" disable="false" continueOnError="false" description="" expand="true">
    <condition>
      <expression type="SMS_TaskSequence_VariableConditionExpression">
        <variable name="Variable">PHASE</variable>
        <variable name="Operator">equals</variable>
        <variable name="Value">STATERESTORE</variable>
      </expression>
    </condition>
    <step type="BDD_Gather" name="Gather local only" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
      <defaultVarList>
        <variable name="GatherLocalOnly" property="GatherLocalOnly">true</variable>
        <variable name="RulesFile" property="RulesFile"></variable>
      </defaultVarList>
      <action>cscript.exe "%SCRIPTROOT%\ZTIGather.wsf"</action>
    </step>
    <step name="Post-Apply Cleanup" disable="false" continueOnError="false" successCodeList="0" description="" startIn="" successCodes="0 3010">
      <action>cscript.exe "%SCRIPTROOT%\LTIApply.wsf" /post</action>
      <defaultVarList>
        <variable name="RunAsUser" property="RunAsUser">false</variable>
        <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
        <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
        <variable name="LoadProfile" property="LoadProfile">false</variable>
      </defaultVarList>
    </step>
    <step name="Tattoo" disable="false" continueOnError="true" successCodeList="0 3010" description="" startIn="">
      <action>cscript.exe "%SCRIPTROOT%\ZTITatoo.wsf"</action>
      <defaultVarList>
        <variable name="RunAsUser" property="RunAsUser">false</variable>
        <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
        <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
        <variable name="LoadProfile" property="LoadProfile">false</variable>
      </defaultVarList>
    </step>
    <step name="Windows Update (Post-Application Installation)" disable="true" continueOnError="true" successCodeList="0 3010" description="" startIn="">
      <action>cscript.exe "%SCRIPTROOT%\ZTIWindowsUpdate.wsf"</action>
      <defaultVarList>
        <variable name="RunAsUser" property="RunAsUser">false</variable>
        <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
        <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
        <variable name="LoadProfile" property="LoadProfile">false</variable>
      </defaultVarList>
    </step>
    <group name="Custom Tasks" disable="false" continueOnError="false" expand="true" description=""></group>
    <group expand="true" name="Imaging" description="" disable="false" continueOnError="false">
      <action />
      <group name="Capture Image" disable="false" continueOnError="false" expand="true" description="">
        <condition>
          <expression type="SMS_TaskSequence_VariableConditionExpression">
            <variable name="Variable">DoCapture</variable>
            <variable name="Operator">equals</variable>
            <variable name="Value">YES</variable>
          </expression>
        </condition>
        <step name="Apply Windows PE" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
          <action>cscript.exe "%SCRIPTROOT%\LTIApply.wsf" /PE /STAGE</action>
          <defaultVarList>
            <variable name="RunAsUser" property="RunAsUser">false</variable>
            <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
            <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
            <variable name="LoadProfile" property="LoadProfile">false</variable>
          </defaultVarList>
        </step>
        <step name="Add mass storage drivers to sysprep.inf for XP and 2003" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
          <action>cscript.exe "%SCRIPTROOT%\ZTIDrivers.wsf"</action>
          <defaultVarList>
            <variable name="RunAsUser" property="RunAsUser">false</variable>
            <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
            <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
            <variable name="LoadProfile" property="LoadProfile">false</variable>
          </defaultVarList>
        </step>
        <step name="Execute Sysprep" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
          <action>cscript.exe "%SCRIPTROOT%\LTISysprep.wsf"</action>
          <defaultVarList>
            <variable name="RunAsUser" property="RunAsUser">false</variable>
            <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
            <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
            <variable name="LoadProfile" property="LoadProfile">false</variable>
          </defaultVarList>
        </step>
        <step name="Apply Windows PE (BCD)" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
          <action>cscript.exe "%_SMSTSMDataPath%\Scripts\LTIApply.wsf" /PE /BCD</action>
          <defaultVarList>
            <variable name="RunAsUser" property="RunAsUser">false</variable>
            <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
            <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
            <variable name="LoadProfile" property="LoadProfile">false</variable>
          </defaultVarList>
        </step>
        <step type="SMS_TaskSequence_RebootAction" name="Restart computer" description="" disable="false" continueOnError="false" runIn="WinPEandFullOS" successCodeList="0 3010">
          <action>smsboot.exe /target:WinPE</action>
        </step>
        <step type="BDD_Gather" name="Gather local only" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
          <defaultVarList>
            <variable name="GatherLocalOnly" property="GatherLocalOnly">true</variable>
            <variable name="RulesFile" property="RulesFile"></variable>
          </defaultVarList>
          <action>cscript.exe "%SCRIPTROOT%\ZTIGather.wsf"</action>
        </step>
        <step name="Create WIM" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
          <action>cscript.exe "%SCRIPTROOT%\ZTIBackup.wsf"</action>
          <defaultVarList>
            <variable name="RunAsUser" property="RunAsUser">false</variable>
            <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
            <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
            <variable name="LoadProfile" property="LoadProfile">false</variable>
          </defaultVarList>
        </step>
      </group>
    </group>
  </group>
</sequence>
