Logo
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
PREGNANCY
 
 
Windows Server

System Center Configuration Manager 2007 : Operating System Deployment - Task Sequences (part 1) - Variables

2/26/2013 11:41:19 AM
Task sequences are the core driver for any OSD operation. They consist of a series of customizable tasks or sequentially performed steps. ConfigMgr 2007 advertises task sequences to a collection in a similar fashion to software distribution packages. Many task types are built into ConfigMgr, and the Microsoft Deployment Toolkit adds a handful of useful tasks as well. Additionally, you can create your own tasks using the SDK if you cannot find one that fits your needs.

The New Task Sequence Wizard, available from the context menu of the Task Sequences node, quickly builds one of two default task sequence types or a custom task sequence:

  • Build and Capture

  • Deploy an Image

These two task sequence types take care of a majority of the scenarios in OSD; however, task sequences are flexible and not limited to what is produced by default. The task sequence editor allows easy customization of the task sequences; you can tailor sequences to the specific OSD needs of an organization—and with a little imagination, software deployment.

The wizard also presents the option to build a custom task sequence; task sequences built using the custom option are initially blank. Figure 1 shows the first screen of the New Task Sequence Wizard.

Figure 1. The New Task Sequence Wizard

To edit a task sequence, right-click it and choose Edit; choosing Properties from the context-menu results in the Properties dialog box of the task sequence and not the task sequence editor. Adding a task is simply a matter of choosing the Add drop-down menu, choosing a task category, and then selecting the task. Each task is customizable and has its own configurable parameters.

1. Variables

Tasks and task sequences are similar to a macro-based programming language or a storyboard where you put together high-level steps and instructions using a graphical tool, without having to know or learn the syntax of the underlying language to take advantage of it fully. Additionally, third parties can add, and have added, tasks extending this pseudo-macro language enhancing what you can do with task sequences.

A major advantage that task sequences have over the traditional software delivery mechanism used in Systems Management Server and now ConfigMgr is that they maintain a state between steps. This state is embodied in a series of built-in variables and custom variables that survive reboots, allowing you to pass data or configuration items from one step to the next. In fact, the task that the task sequence is currently executing is also part of the task sequence’s state. Variables are encrypted for security when transmitted between ConfigMgr and the target system.

Here are the three types of variables available:

  • Action— Specify parameters for specific tasks. Nearly all are directly editable using the task sequence editor.

  • Custom— Simple name and value pairs that you can define as you see fit.

  • Built-in— Mostly read-only, start with an underscore, are generated automatically by the task sequence, and generally describe the environment where the task sequence executes.

The full list of task sequence action and built-in variables is available at http://technet.microsoft.com/en-us/library/bb632442.aspx. Action variables and custom variables can be set in a number of ways:

  • Using a Set Task Sequence Variable task.

  • Statically assigning them to a specific computer resource.

  • Statically assigning them to a collection.

  • Using the Microsoft.SMS.TSEnvironment COM object in a script or other COM compliant language. 

  • Leaving the value of a collection or computer variable blank (new with ConfigMgr 2007 R2). The built-in task sequence UI prompts the user for values for these empty variables. 

Task sequence variables set by a Set Task Variable task take precedence over computer-specific variables, which in turn take precedence over collection variables. Collection variables propagate down the site hierarchy with other collection settings. You can assign computer variables only at the site the computer is a member of, and they do not propagate up or down a site hierarchy.

You can use variables for the following tasks:

  • Conditionally execute tasks.

  • Perform string replacement in command lines. (See the example later in this section and Figure 2.)

    Figure 2. Using String replacement in a Run Command Line task

  • Provide task-specific parameter values. (See the example in this section and Figure 3.)

    Figure 3. String replacement in a task parameter

  • Perform string replacement in unattended files. 

For string replacement and parameter values, surround the name of the variable with % symbols; for example for a variable named MyCustomVar, use %MyCustomVar%. The task sequence engine replaces this with the value of the variable. As an example, Figure 19.15 shows the Run Command Line task. This figure demonstrates adding an entry to the Registry that you can later utilize to track the deployment version used when creating the system. You can supply the actual version by a collection variable or a preceding Set Task Sequence Variable task.

Figure 3 shows an example of replacing a parameter in a task. This example shows how you can use multiple product keys in a deployment. You can supply the actual product key in a collection variable or a preceding Set Task Sequence Variable task.

Other -----------------
- Microsoft Dynamics GP 2010 : Preventing Errors in Dynamics GP - Correcting errors by backing out, correcting, and copying Journal Entries
- Microsoft Dynamics GP 2010 : Preventing Errors in Dynamics GP - Preventing sales of Discontinued Inventory
- Windows Server 2003 on HP ProLiant Servers : Active Directory Logical Design - Replication Topology (part 3) - Designing an Efficient Replication Topology
- Windows Server 2003 on HP ProLiant Servers : Active Directory Logical Design - Replication Topology (part 2)
- Windows Server 2003 on HP ProLiant Servers : Active Directory Logical Design - Replication Topology (part 1) - Challenges and Issues in AD Replication
- Extending the Real-Time Communications Functionality of Exchange Server 2007 : Exploring Office Communications Server Tools and Concepts
- Local Continuous Replications in Exchange Server 2007
- Microsoft Dynamics CRM 4.0 : SharePoint Integration - Store Attachments in SharePoint Using a Custom Solution
- Microsoft Dynamics CRM 4.0 : SharePoint Integration - Custom SharePoint Development
- Windows Server 2008 R2 file and print services : Administering Distributed File System Services (part 2) - Configuring and administering DFS Replication
- Windows Server 2008 R2 file and print services : Administering Distributed File System Services (part 1) - Configuring and administering DFS Namespaces
- Customizing Dynamics AX 2009 : Number Sequence Customization
- Microsoft Systems Management Server 2003 : Queries (part 3) - Executing Queries
- Microsoft Systems Management Server 2003 : Queries (part 2) - Creating a Query
- Microsoft Systems Management Server 2003 : Queries (part 1) - Query Elements
- Microsoft Systems Management Server 2003 : Custom SMS Administrator Consoles
- System Center Configuration Manager 2007 : Operating System Install Packages and Image Packages (part 2) - Manual Image Creation, Image Deployment
- System Center Configuration Manager 2007 : Operating System Install Packages and Image Packages (part 1) - Automated Image Creation and Capture
- System Center Configuration Manager 2007 : Operating System Deployment - Computer Associations
- Microsoft Exchange Server 2007 : Load Balancing in Exchange Server 2007
 
 
Most view of day
- System Center Configuration Manager 2007 : ConfigMgr Classic Reports Versus SQL Reporting Services
- Microsoft Visio 2010 : Sharing and Publishing Diagrams - Publishing Visio Drawings to SharePoint 2010 Visio Services
- Extending the Real-Time Communications Functionality of Exchange Server 2007 : Exploring Office Communications Server Tools and Concepts
- Advanced Windows 7 Programming : Working in the Background - DEVELOPING TRIGGER-START SERVICES (part 6)
- Workflow in Dynamics AX 2009 : Workflow Life Cycle (part 3) - Activating the Workflow
- BizTalk Server 2009 : Editing and Resubmitting Suspended Messages (part 2) - Pseudo-Walkthrough to Perform Edits and Resubmits
- Windows Server 2012 : File Services and Storage - Configuring iSCSI storage (part 1) - Understanding iSCSI storage
- Windows Phone 8 : Configuring Basic Device Settings - Passwords and Screen Timeouts (part 1) - Setting the Screen Timeout
- Securing the Workstation : Applying the Castle Defense System (part 6) - Working with external access - Working with the Windows Firewall with Advanced Security
- SQL server 2008 R2 : Reverting to a Database Snapshot for Recovery
Top 10
- Microsoft Project 2010 : Linking Tasks (part 8) - Auditing Task Links,Using the Task Inspector
- Microsoft Project 2010 : Linking Tasks (part 7) - Creating Links by Using the Mouse,Working with Automatic Linking Options
- Microsoft Project 2010 : Linking Tasks (part 6) - Creating Links by Using the Entry Table
- Microsoft Project 2010 : Linking Tasks (part 5) - Creating Links by Using the Task Information Dialog Box
- Microsoft Project 2010 : Linking Tasks (part 4) - Entering Leads and Lags, Creating Links by Using the Menu or Toolbar
- Microsoft Project 2010 : Linking Tasks (part 3) - Using the Start-to-Start Relationship,Using the Finish-to-Finish Relationship
- Microsoft Project 2010 : Linking Tasks (part 2) - Using the Start-to-Start Relationship,Using the Finish-to-Finish Relationship
- Microsoft Project 2010 : Linking Tasks (part 1) - Defining Dependency Links
- Microsoft Project 2010 : Defining Task Logic - Manipulating Your Schedule
- Microsoft Lync Server 2013 : Director Troubleshooting (part 3) - Synthetic Transactions,Telnet
 
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro