Setting the RebootStep variable is one of the custom steps inthe Dell DDP that can be difficult to troubleshoot. The Set RebootStep Task Sequence step connects to the ConfigMgr site, and creates/modifies the RebootStep object variable on the computer object. To achieve this, you must specify an account that has modify rights to the computer object. If this step fails during Operating system Deployment, verify that the desired user account has proper permissions. Notice there are two Task Sequence steps named "Set RebootStep Variable", and two named "Reboot to PXE /USB" - all four of these steps modify the RebootStep computer object variable.

When you create a Dell OS Deployment Task Sequence Template, you enter the username/password one time, and the wizard populates the data in each step. If you later decide to change the credentials, be sure to make the change in all four Task sequence steps.

DDP - Example TS Step
In the figure above, the user account named "testlab\LowRightsUser" will be used to modify the RebootStep variable. The account "testlab\LowRightsUser" must be in the "SMS Admins" local group on the ConfigMgr site, and must also be granted Read Resource and Modify rights on the collection that contains the computer object to modify.

If you continue to receive errors on the "Set RebootStep" or "Reboot to PXE/USB" steps, take a close look at the SMSTS.LOG after the error appears. The output from the command should appear in the log. **Notice that the username/password appears in clear text - be sure to use a low rights account for this task.

If you continue to encounter errors with these steps, use the sample vbscript below (adapted from the ConfigMgr SDK) to test the process of creating a Task Sequence variable, using the credentials used in the Task Sequence:

'''''''''''''Code Start (CreateTSVariable.vbs '''''''''''''''''''''''
strSMSServer = "myTestLAB" 'The server name of the site server
strVarName = "TestRebootStepCollVar" 'the variable name to create
strVarValue = "200" 'the variable value
intMask = 0 ' set to 0 to NOT mask the variable value
intResourceID = 701 'the resourceID of the client to modify. To find the ResourceID, right-click on the computer object,

'and select Properties fromt he ConfigMgr Admin Console.
strUserName = "testlab\LowRightsUser" 'domain/username of the account
strPassword = "myLowRightsUserPassword" 'password of the account

Set objLoc = CreateObject("WbemScripting.SWbemLocator")
Set objSMS= objLoc.ConnectServer(strSMSServer, "root\sms", strUsername, strPassword)
Set Results = objSMS.ExecQuery _
("SELECT * From SMS_ProviderLocation WHERE ProviderForLocalSite = true")
For each Loc in Results
If Loc.ProviderForLocalSite = True Then
Set objSMS = objLoc.ConnectServer(Loc.Machine, "root\sms\site_" & _
Loc.SiteCode, strUserName, strPassword)
strSMSSiteCode = Loc.Sitecode
end if
Next


CreateComputerVariable objSMS, strSMSSiteCode, strVarName, strVarValue, intMask, intResourceID
Sub CreateComputerVariable(connection, siteCode, name, value, mask, computerId)
Dim computerSettings
Dim computerVariables
Dim computerVariable
Dim Settings

' See if the computer settings object already exists. if it doesn't, create it.
Set settings = connection.ExecQuery _
("Select * From SMS_MachineSettings Where ResourceID = '" & computerID & "'")

If settings.Count = 0 Then
Wscript.Echo "Creating computer settings object"
Set computerSettings = connection.Get("SMS_MachineSettings").SpawnInstance_
computerSettings.ResourceID = computerId
computerSettings.SourceSite = siteCode
computerSettings.LocaleID = 1033
computerSettings.Put_
End If

' Get the computer settings object.
Set computerSettings = connection.Get("SMS_MachineSettings.ResourceID='" & computerId &"'" )

' Get the computer variables.
computerVariables=computerSettings.MachineVariables

' Create and populate a new computer variable.
Set computerVariable = connection.Get("SMS_MachineVariable").SpawnInstance_
computerVariable.Name = name
computerVariable.Value = value
computerVariable.IsMasked = mask

' Add the new computer variable.
ReDim Preserve computerVariables (UBound (computerVariables)+1)
Set computerVariables(UBound(computerVariables)) = computerVariable

computerSettings.MachineVariables=computerVariables

computerSettings.Put_

End Sub
''''''''''''''''''''''''' Code End''''''''''''''''''''''''''


Run this vbscript from a test workstation to verify connectivity, authentication, and variable creation for the computer object. This sample script uses the same methods to create the Comptuer Object Variable as the commands in the Dell Deployoment Pack Task Seqence steps mentioned above. If you are unable to run this script and successfully create computer object variables, spend the time to get this working, which will help you succeed in configuring the Task Sequence Step using Operating System Deployment.