Archive for category The Power of Task Sequences
This is part 4 of many! For the most part, this is same content/notes that I had done as part of my SCCM Guru sponsored webcast in early 2012.
Tips & Tricks
- Copying steps between different task sequences
- Controlling reboot behaviors with the exit codes
- Maybe extend this script to use a TS variable to modify the restart behavior?
- Only execute when certain software is installed
- Using SMS_InstalledSoftware instead of Win32Reg_AddRemovePrograms
- Installing multiple applications
- Troubleshooting OS deployments using task sequences, such as Software Updates
- List of hotfixes for task sequences??
- WMI conditions for if statements
- How to access the SCCM client during a task sequence
- Installing software updates
- Bug in software updates for task sequences
i. how to run fix with VB Script
- Workaround for installing Office updates during a TS
- How to halt/kill execution of an actively running task sequence
- Updating SCCM default boot images to support HTA
- How to add language packs without MDT
- Hiding the display dialog box
- Set ProgressUI = CreateObject(“Microsoft.SMS.TsProgressUI”)
- When this is useful
- TS documentor
- Copy logs (check Maik’s blog)
- Email notification
- Automagically include support-related files in your boot images for troubleshooting during task sequences.
- How To: Inject Drivers from USB During a ConfigMgr Operating System Task Sequence
- Jason Sandy’s OSD App Tree
- Automatically documenting your task sequences
- Versioning / Monitoring SCCM Task Sequences
- How can I get my task sequence to prompt for a password?
- Jason Sandy’s OSD++
- Logging TS Variables –
- Possible to run a DCM in a TS to detect inventory?
- Enhanced Patch Management
- Displaying HTA in an OS or allowing user interaction with ServiceUI
- Hardware configuration with the Dell CCTK
This is part 3 of many! For the most part, this is same content/notes that I had done as part of my SCCM Guru sponsored webcast in early 2012.
Operating System Deployments
Throughout this presentation, I have exposed several ways for selective decision logic to automate various software installations and other administrative tasks. They had nothing to do with operating system deployment. The reality is that task sequences were originally created to facilitate OS deployment. I would need to get beside myself if I didn’t at least mention some cool things that can help you all out in your OS task sequences.
Consolidating Everything into a Single Image and Task Sequence
Core Image Build and Capture
One of the most common themes I hear around the industry related to general OS management is that business are attempting to manage more than a single image. Dealing with the effort to build and maintain multiple images creates huge overhead in costs. There is only scenario in which there absolutely must be more than a single image – when the OS and architecture are different. For example, you would need one image for 32-bit Windows XP, one for 32-bit Windows 7, and one for 64-bit Windows 7. Rarely should there be a reason for multiple images that have the same core OS.
Generally speaking, your image build and capture should only ever contain Windows, Office, other Microsoft enhancements such as MSXML or .NET, maybe a newer Internet Explorer, and security updates. If you build your image in this way, then you can easily get away with only updating your images only once or twice per year to include new security updates.
Core Image Deployment
That info was just for capturing your core image. Other software and configurations still need to be accomplished in order for the PC to be functional for the business. Unfortunately, there are administrators who may say that while it’s great to have just a single image, they still need multiple task sequences to service for different departments or different hardware. Well, here’s the great news: with the power of task sequences, you can consolidate all of those task sequences into one!
In this example, using our core image, we will create a robust deployment task sequence.
- Two different computer models: one laptop and one desktop
- Software that is only for laptops (such as VPN)
- Software differences for desktops which are different between a kiosk user desktop and an office user desktop (such as Citrix)
- Software that can only be installed on accounting computers (calculator tool)
- Option to enter the computer name
Expanding OS Deployment Functionality
The deployment task sequence we just constructed is a good step in the right direction. But what if you need to provide additional functionality for the imaging process? Such as the ability to
- Enter a computer name of choice
- Select a time zone
- Select the Active Directory OU in which to join the computer
- Select additional one-off applications to be automatically installed
One of the most common ways to do these is to use a customized prompt written as HTML Application, or just HTA. There are many people in the systems management community, including myself, who have blogged our HTAs as examples. Optionally, the Microsoft Deployment Toolkit 2010 Update 1 contains those abilities natively, and provides the most versatile solution when it’s integrated with ConfigMgr. Discussion how to write your own HTA or use MDT is outside what I am going to explain today, so if you’re unfamiliar with either of these products, I suggest using your favorite search engine or you can contact me.
Returning to the original goal of extending the task sequence features, I have prebuilt an HTA which utilize both built-in and custom task sequence variables to
- Supply a computer name (OSDComputerName)
- Time zone selection (OSDTimezone set and step blank)
- OU options (OSDDomainOUName set and step blank)
- Choosing one-off applications (Custom variables)
This is part 2 of many! For the most part, this is same content/notes that I had done as part of my SCCM Guru sponsored webcast in early 2012.
Thanks everyone for sticking it out with me through the webcast so far! I hope that I haven’t lost too many folk. Now that we’ve reviewed the fundamentals of task sequences – steps, variables, and conditions – lets now get into some scenarios, examples, and demonstrations of what the power of task sequences can do. As mentioned task sequences are not just for deploying an OS. They can be used for automating any tasks such as deployment of varied software, chaining installations, configuring Windows, performing decision logic, etc.
Prior to task sequences the only way to link together, or chain, execution of different packages was to use the “Run another program first” option with the advanced settings of the program. In such a way, you could chain multiple packages together to ensure exact execution in a precise order of operations. However, this suffers from some limitations such as if one program failed midway in the chain, the remainder of the chain failed. Furthermore, if the chain was rerun, it then needed to rerun from the very beginning of the chain and repeated those programs which were previously successful. Although it was good for what needed to be accomplished, it still had challenges and limitations.
Now with the power of task sequences, chaining programs is almost a thing of the past. In fact task sequences can give you as the administrator so much more control over the end goal.
Demo: MS Office upgrade
A prime example that I always like to demonstrate is an upgrade of Microsoft Office, such as upgrading from 2007 to 2010 along with upgrading any Office 2010 installs to SP1. There are several steps into accomplishing this upgrade. Allow me demonstrate:
- Set the TS shutdown behavior
- Set the message to something friendly
- Set the countdown to 10 minutes
- Restart Windows so that no Office files are locked
- Except if no Office is installed
- Change the restart message
- What to do about the SCCM client cache size? (e.g. since it’s downloaded into _SMSTaskSequence, cache size does not need to change)
- Install Office 2010 (skipping upgrade is Office 2010)
- One configuration with just Word, Excel (such as a kiosk)
- One configuration with all software
- Install Office 2010 Service Pack 1
- Install security updates
- Defrag the hard drive
Demo 11: Office 2010
Demo: detection of 32-bit vs. 64-bit
As mentioned, a typical best practice distribution of software is to build collection where the query is designed to only target computers that are missing a particular application version unless the version is newer. For example, Application A is installed corporate-wide at version 1.0. You’ve been tasked with upgrading it to version 1.1 and any computers missing the application. However, some computers are running 1.2 so they should not be included in the target. So you would be your sub-select query to fulfill these requirements.
Here is a great example of this similar scenario. I recently assisted a customer with creating a task sequence to deploy Microsoft updates to their servers, including an upgrade of VMware Tools to the latest version and to install the software if it didn’t exist at all. Normally this can be moderately simple, but detection of the software requires two different methods since the tools have a 32-bit version and 64-bit version. The detection boils down to:
- On 32-bit Windows
- Install if software not present with 32-bit detection
- Upgrade if software version older than current version using 32-bit detection
- On 64-bit Windows
- Install if software not present with 64-bit detection
- Upgrade if software version older than current version using 64-bit detection
Demo 12: Include an example of the sub-select query so that it translates better into how that looks in a WMI query. Also demonstrate how it could be broken into two different steps of x86 and x64 or combined into one step.
Demo: Workstation Updates
Here’s a situation that you’re all familiar with: keeping the desktops and laptops updated with the most secure software within the environment. Though often times, software is deployed on as-needed basis, more and more companies require a change control process coordinated with a specific period in which the updates can be deployed to computers.
At its most simplistic form, an admin could just assign a package to a collection with the assumption and hope that all computers installed the updates. A better step in the right direction is to create a collection with a sub-select query to only target the computers that actually need the software. However, what does one do if you want the best of both worlds? Turn to the power of task sequences of course! This is a great example if you’re in a situation where all actions need to run in a systematic timeline with very little lag and better visual indicator to users.
- Change the default restart time from 30 seconds to 10 minutes so users have enough time to close documents if necessary.
- Pre-install restart
- Install Adobe Reader update (only if Acrobat not installed)
- Install Adobe Acrobat update (only if Acrobat installed)
- Install Microsoft Security Updates
- Upgrade BIOS for computer model XYZ
- Restart computer into WinPE so as to do the next item:
- Execute a utility to enable Wake On LAN in BIOS
- Force a Group Policy Update with system restart
Miscellaneous Administrative Tasks
Now let’s pretend you have a string of routine administrative tasks to perform against computers on a regular basis. Task sequences are also powerful in this way by not just being limited to installing software or deploying an OS. The example that I’ll use here may not completely be a real world example, but again, it is designed to demonstrate flexibility and get your juices flowing.
- Delete old user profiles
- Cleanup temp files
- Delete SCCM cached files
- Flush/register DNS
- Check the local admins group for unauthorized users/groups (use Sherry’s DCM?)
- Force a Group Policy Update without system restart
- Run SCCM Client Health Check Script
- Defrag hard drive
Demo: Complex Conditions Flows
Along the way with the demos so far, I’ve tried to incorporate different examples of using task sequence conditions. The VMware Tools demo definitely showed some complexity using WMI queries to decipher 32-bit versus 64-bit detection. But now let’s have some fun by taking this a step further! We need deploy a software install which meets the following requirements:
- The post-install restart of Windows for a specific department needs to give a 10 minute countdown (first 3 digits of computer name are the department code)
- Only execute on Windows workstation OS (excluding Windows 2000)
- Cannot execute on computers which live in a specific OU
- A combination of four installation types based upon
- Two different command lines parameters where applicability comes from a value in the registry
- Two different architectures (32-bit vs. 64-bit)
- An additional install occurs for computers which have a special local user account
Demo: Multiple methods to accomplish same thing
I am going to have more fun with the flexibility of task sequences by demonstrating six different ways to accomplish the same thing. In this example, we are going to uninstall Flash v10 and install Adobe Flash v11 either with the 32-bit or 64-bit editions. Keep in mind that some of these exmamples are a little unrealistic, but it does exhibit the flexibility.
Demo: Uninstall Flash 10, install Flash 11
- Easy: individual steps with no checks, just do it regardless
- Easy: WMI queries for existence or architecture
- Easy: step for the Installed Software using an MSI
- Moderate: use a script which sets a custom TS variable to do the uninstall detection
- Moderate: use collection custom TS Variable
- Moderate: multi-application install to do everything at once
Demo: Operations within Windows PE
Here is a cool thing that I’ve done in my experience. There had been a few instances where one of the field offices was being sold to another company, but it was contracted for the new ownership to retain the existing computer hardware. The challenge therein was that we couldn’t allow them to have access to company software licenses or data that may exist on the system. So I developed a task sequence to remotely erase the hard drive.
- Restart in WinPE
- Format the disk
- Restart the TS to boot into the host OS
This is part 1 of many! For the most part, this is same content/notes that I had done as part of my SCCM Guru sponsored webcast in early 2012. A big thanks to Jason Sandys for reviewing and providing some additional insights to this post.
I’m certain many of you are in a similar position or maybe that you are still learning how to get the most out of systems management with ConfigMgr. One of the things that I learned along the way was that although task sequences are essential for operating system deployment, they can also play a vital role in other systems management with ConfigMgr. Task sequences are versatile and robust with tremendous functionality that is often unknown, overlooked, or underutilized. The power of task sequences lies in their flexibility for administrators to configure client settings, distribute software, update drivers, edit user states, and perform other tasks independent of OSD.
I’m here today to touch on some of this functionality to hopefully help spark your interest to discover how you can use them to enhance and simplify your own environment. I’ve compiled various use cases, examples, questions that have arisen within the community, and scoured the Internet for how others have used task sequences, community-developed custom solutions to augment task sequences. While not all of the examples are useful to everyone, they are designed to hopefully get your brain juices flowing and be an example on…drumroll please….the power of task sequences.
Let’s first cover some basics that set a good foundation for getting the most out of task sequences. Without an understanding of these foundations, the rest of the presentation isn’t as meaningful. The three things that I consider to be foundational are: task sequence steps, task sequence variables, and task sequence conditions. I’m going to try to make this relevant so that I do not bore you veterans on the webcast!
Note that the ConfigMgr writing team at Microsoft has excellent explanations documented about task sequences on TechNet. Some of those descriptions are just quick highlights of what it written, but I suggest you read the TechNet articles sometime to further familiarize yourself with them.
Task Sequence Steps
Task sequence steps are the basic components that take action within the task sequence. For those who have not worked with task sequences much, the steps essentially define what you’re trying to accomplish on the running computer, such as installing software, creating and/or installing an OS, changing registry data, migrating user data, etc.
There are 27 total steps that can be used. However, for today’s demonstrations I will primarily use six.
Run Command Line – with this step, almost any command can be run, whether it is a trigger an installer, or kicking off a utility, running a script from a package, or initiating a process from files on the local disk.
Install Software – along with being able to install software using “Run Command Line”. There are two different ways to install applications
- Install single application – this option is likely the most common way to install software during a task sequence. It only runs a single Package with a single Program. If you’re Programs are just executing a single installer (like setup.exe for example), then that’s all you get is the one install. Otherwise if a package has several things additional things to do, those would need to be either added into additional programs for the package, or you would need to wrap all actions together into a script.
- Install multiple applications – To be honest, I’ve always overlooked and bypassed this option throughout my career and “rediscovered” during creation of this presentation. It’s pretty cool. Unlike using the install a single application, it is possible to install anywhere from 1 to 999 applications with this option selected! It is important to note that for this to function, the option on the Program’s Advanced tab must be selected to allow it to run in a task sequence. http://social.technet.microsoft.com/Forums/en-US/configmgrdocs/thread/3f7819a7-8934-444f-9d67-5cb152efb78b
Install Software Updates – this step is used for installing Microsoft updates. The only thing I’ll mention at the moment is to ensure you’ve created a software update deployment that is assigned to a collection in which the computer resides.
Join Domain or Workgroup – This will be used as an example of utilizing task sequence variables to dynamically configure the options so that only one step is used instead of multiple steps.
Set Task Sequence Variable – Much more on this coming up soon
Demo 1: Basic task sequence to demonstrate the above steps
- Run command line: execute cmd.exe
- Run command line: execute a batch file from a package
- Install Software: execute a package/program
Success/Failure Exit Codes
Another thing to note about task sequence steps are the exit codes for software installations. If the install or script does not terminate with an exit code of 0 or 3010, then the task sequence will fail. However, let’s say there is a known application breaks normal conventions by having their successful exit code be as either “0” or “1” and their failure as “3010”. There are a couple of ways to approach a scenario like this. The first option could be to create your own custom script wrapper to grab the exit code and then terminate the script with a zero. Or in the task sequence, use the Run Command Line option to account for the non-standard successful exit codes.
Demo 2: Example that causes the TS to fail with custom exit code 1
Demo 3: Example that causes the TS to succeed with custom exit code 1
Task Sequence Variables
Task sequence environment variables provide a mechanism to configure and customize the steps in a task sequence. In fact, when I last counted the number listed on TechNet, there are 154 built-in variables that can be used to control and automate your task sequence. And with the ability to create your own custom task sequence variables, the possibilities are endless!! Imagine being able to automate:
- Configuration of any settings and actions
- Creating administrator customized values
- Providing command-line arguments to a step
- Grab values for custom scripts and HTA front ends for OSD
- Access and override built-in, default values which drive an installation or an OS configuration
- Evaluating conditions prior to a step or groups execution (which I explain further in this presentation)
- And they can be specific to a computer running the task sequence or to all computers in the assigned collection
There are too many built-in variables for me to describe without causing a mass exodus on this webcast, but there are a few that I want to highlight as I find to be of more value and when they could be useful. Take note that any task sequence variables that begin with an underscore character are read-only and their associated values can only be read, not changed. http://technet.microsoft.com/en-us/library/bb632442.aspx
- _SMSTSInWinPE – Determining whether or not to launch a specific step based upon being inside WinPE or full Windows.
- _SMSTSMachineName – If you need to know the name of the SCCM computer record on which the task sequence is running, this can be used. I’ve used this variable to pre-populate the name of the computer being imaged into a custom HTA.
- _SMSTSLaunchMode – How the task sequence was started (boot media, PXE, advertisement, etc.)
- _SMSTSUserStarted – Along with _SMSTSLaunchMode, can detect if the task sequence was launched by a user in Run Advertised Programs
- _SMSTSPackageName – Let’s pretend that for auditing purposes, you need to “tattoo” the task sequence that executed into the registry or a custom log file. You could grab this value to get the name of the task sequence that ran. I’ve used this myself that after every time a task sequence was modified, part of my process was to increment a version value in the name, such as “My TS 1.00” to “My TS 1.01”. Then this value was added to a registry value for distant future auditing.
- SMSTSErrorDialogTimeout – When an error occurs in a task sequence, a dialog box is displayed that is dismissed automatically after a default time-out value. Use this variable to specify a time-out value in seconds other than the default of 15 minutes.
- SMSRebootMessage – Customizes the message to display in the shutdown dialog box when a reboot is requested. This is especially useful when an end-user may see the restart and wonder what’s happening. Such as “The IT Department is has installed updates and a computer restart in progress to complete”.
- SMSRebootTimeout – Specifies how many seconds to wait before the computer restarts. Again, this is useful when a user may be in Windows at the time when the restart is required. Increasing the value to manageable time for them to save/close documents is useful in this case.
- SMSClientInstallProperties – Could be particularly useful if there are many client install properties, that for consistency sake amongst many task sequences, this could be set in a script.
- OSDJoinAccount & OSDJoinPassword – If a single task sequence is necessary to possible join a computer to different domains, then these could be used to dynamically automate this process.
- OSDDomainOUName – Similarly, this can be used to dynamically set the OU in which to place the PC
- OSDComputerName – Used to set (or change) the computer name. I’ll admit, this variable is not exciting per say, but it is probably the most common one used. Because who wants their computer to be name MININT-K5G9E2? Again since this is the most commonly used variable, I will be using it in many examples throughout the presentation.
- OSDLocalAdminPassword – If necessary to have a custom local admin password for the computer being deployed.
Anything configured when creating the task sequence essentially pre-populates the task sequence variable values so thats what they start out as. This is also known as design-time. These are not set during the execution of the ts but rather stored in a file, tsvariables.dat, that is transferred to the client at the beginning of the ts when the initial values are set so that when a task requests their value(s), it is/they are available.
Anything set during the execution of the task sequence, aka run-time, overwrites these values so that when the task that uses them requests them, the variables reflect the value of the activity that most recently set them. Thus anything that sets them during the execution of the task sequence wins; this could be a script, the set task sequence variable task, or something else.
Demo the code to get/set TS Variables:
Demo 4: Read/set a variable as a task sequence step
Get read only variable
- Set custom variable
- Get read only variable
Unfortunately, there is a catch to the built-in task sequence variables. Many of them are only available during execution of particular action. However, this may just have been an issue with a particular environment that I operating within for many years as once set variables are set, they always set. As mentioned above, they are pre-populated by the values set at design-time. Certainly if the task, like Apply Network Settings” isn’t in the task sequence, then its corresponding values are never pre-populated. Something must explicitly create or clear a ts variable. For the built-in ones, this is the ts engine itself at the beginning of the ts using the tsvariables.dat file — at least for creation, there is nothing that deletes them.
Demo 5: Demonstrate a particular task that will only exist during execution of the step/action and then gets reset
- Set variable WorkingDirectory to C:\Demo
- Create a Run command line to run demo5a.bat
- Create a Run command line to run demo5b.bat
A workaround to this limitation is to use a script to snag the variable and stuff it into a custom variable. Which is part of the beauty of custom task sequence variables; the sky is the limit. For example, let’s pretend that you are deploying an OS (or even just software and updates!) to various departments using a single task sequence. Well, Rod Trent in the marketing department is probably going to be upset with you if TweetBlocker gets installed instead of his favorite application named MMSTwitterArmy. In a situation like this, you put together a quick script that would set a custom task sequence variable named OSDTwitter = yes. Then when the action to install the software executes, you can set a check against that task sequence variable to check against the custom task sequence variable.
Demo 6: Install Software: create a multi app install by setting custom variables
- How to limit execution of a step to a custom variable as well as
- Example of using a script to get the computer name that contains “MKT” for marketing.
- Create fake executables named TweetBlocker and MMSTwitterArmy for visual effect
- Various options for the check, such as the actual value versus if the variable exists
- Script to company multiple default variables into a single custom variable which is then used to set the computer name. (obviously this is a ridiculous and not useful as a real world example, but gets the point across)
Another viable option for defining custom variables is to set them on the collection itself. In this instance, we’re going to create a variable to prompt
Note that if the value is left blank, then prior to the task sequences execution, a dialog box will be displayed for someone to manually input the value. If there are several or many collection variables defined, then it could become a hassle as there will be an individual prompt for every single one of them. So, a good example of when this may be useful is when needing to set the computer name only during imaging or maybe defining what the local admin password should be.
Demo 7: A single collection variable
- Go to collection properties > Collection Variables > add variable Demo7 with value ValueForDemo7
- Show VBScript which grabs the value of the task sequence collection
- Show the task sequence code
- Execute the task sequence
Demo 8: Different sub-collections with the time zone collection variables set, but the TS assigned to the parent collection and allowed to be advertised to the sub-collections.
- Go to sub-collection properties > Collection Variables > add variable Demo8 with value ValueForDemo8
- Show VBScript which grabs the value of the task sequence collection
- Show the task sequence code
- Show that the advertisement applies to the subcollection
- Execute the task sequence
Task Sequence Conditions
The third and final task sequence fundamental is conditions. Task sequence conditions are optional statements for a step (or group) which, when evaluated during runtime, will determine if the step (or group) will execute.
With conditions, you can check against the following:
- Task Sequence Variables – custom variables or built-in variables
- Operating System Version – determines the active operating system and/or the processor architecture (x86/x64) that is executing the task sequence
- File Properties – includes checking existence of the file, the file version, and/or the file timestamp
- Folder Properties – includes checking existence of the folder and/or the timestamp
- Registry Setting – includes checking registry keys and values
- Query WMI – if it’s in WMI, then you check for it easily, such as querying for a computer model
- Installed Software
Additionally, you can have any combinations of these items and “if” statements (any of, all of, none of) against a combination of the conditions! An example of when to use these “if” statements might resemble an instance of only executing a step if a computer is a specific model, has a specific registry value set, but a certain file does not exist. These can be combined and checked on a single condition statement for the step.
Demo 9: How to use each of the items listed
Tool to help generate WQL – http://www.microsoft.com/download/en/details.aspx?id=8572
Demo 10: How to use the “if” statements
If you weren’t able to watch my SCCM Guru webcast (sponsored by BDNA) on March 28th on the Power of Task Sequences, the webcast is available to watch on YouTube or for download on iTunes. Or you can watch it right from my blog! Also, I have a post on Q&A from the webcast that you can read.
If you have a custom HTA or dialog box as part of a task sequence, the dialog box could get in the way. And it’s quite annoying to manually drag it out-of-the-way every time. A workaround to this is to hide that task sequence dialog box altogether with the following VBScript. So run this bit of code before you launch the HTA
On Error Resume Next ' Hide the task sequence window Set ProgressUI = CreateObject("Microsoft.SMS.TsProgressUI") ProgressUI.CloseProgressDialog
First, I want to thank everyone who joined my SCCM Guru webcast on the Power of Task Sequences last week. There was a great audience who asked questions the entire time, which means I didn’t bore you all :-) If you were not able to watch the webcast, the replay is available on BDNA’s website. Optionally, you can grab my slide deck from MyITforum. In the future, I plan to do a series of blog posts on my content on the Power of Task Sequences.
During the presentation, it was possible to ask questions. Rod Trent and Ron Crumbaker were attempting to answer as many as they could, but the following questions they could not get to at that time.
Q&A Session for SCCM GURU Webcast – Nick Moseley – Mar 28
Date: Wednesday, March 28, 2012
Q: Is there a way to target a user or group instead of a computer to run a task sequence?
A: Task sequence advertisements fall under the same rules as standard software distribution. The advertisement gets assigned to a collection that contains resources, either users or computers. MVP Matthew Hudson has a good blog post to help get you started: http://sms-hints-tricks.blogspot.com/2007/04/collection-of-computers-based-on-users.html
Q: Within the cmd line, does SCCM do error checking to make sure the commands are correct syntax?
A: No, unfortunately it does not. So you will need to use caution with what you enter and test that in advance to ensure the command is accurate.
Q: What are the advantages of using multiple applications?
A: The total size of the task sequence XML cannot exceed 10 MB. Should you run into a situation where there are too many steps (or whatever) that cause the task sequence to be too large, you could consolidate steps that install individual software into just the one step.
Q: Is it possible to use Task Sequences with Internet Based Clients?
A: Yes. However, if you are planning to deploy an OS or do operations within WinPE, then you will need to see information on native mode certificates for OSD at http://technet.microsoft.com/en-us/library/bb633147.aspx
Q: Are Collection Variables stored for future reference on each device of that collection? I mean, once I set them, if I need to use them another time, would it be accessible with its previous value?
A: It depends. Any collection with a collection variable assigned to it, any computers in that collection will receive that variable and value. However, if the variable is blank/empty, such that it gets set during execution of the task sequence, the value will be reset after execution of the task sequence completes.
Q: so… if I set a variable with the IE proxy, for example, once that it was set once; if I re-image the computer, the previous entered value will be accessible, right?
A: See above answer J
Q: Is there a TS variable to retrieve the current user that is logged into the machine the TS is running on?
A: Unfortunately there is not. The task sequence is only going to execute under system context, so the task sequence is unable to retrieve the logged in user information. However, it could be possible to
- Create a package/program to execute a script which gets environment variable %username% and writes it into the a custom registry location
- Have that program set to only run when a user is logged into Windows and run as the user’s credentials
- Configure the task sequence properties to execute that package/program
- Have a step in the package that grabs that custom registry key, and optionally stuff it into a custom variable for other uses throughout the task sequence.
Q: RE: some updates not running during TS… would a restart and repeat of the Install SW Updates step do the same thing as the rescan script you mentioned?
A: Ultimately, it would be nice if we didn’t have to do any of the additional steps. This is longstanding known problem that is unfortunately resolved by running the script (which just forces a scan for the latest applicable updates) and then the Install Software Updates step which actually initiates an install of those “new” updates.
Q: If a step inside the sequence fails, how do you get the CM report to show the failed step?
A: The task sequence will automatically report the status failures up to the site for reporting, so there is no need to do anything special.
Q: Is it possible to call other task sequences from within a single “master” task sequence?
A: This is the question of the day! Ironically, I was curious about the same thing when creating this presentation. I wanted to call it the “Inception” effect, just like the movie. Unfortunately due to time, I wasn’t ever able to develop/test to see if it was possible. Maybe I will do that for a future blog post!!
Q: Is that sup_fix.vbs out on myITforum somewhere?
A: You have a good eye ;-) That script is available on my blog at http://t3chn1ck.wordpress.com/2012/01/26/vbscript-to-run-sccm-software-updates-scan/
Q: What’s red and smells like green paint?
A: Red paint (thank you Bing for the answer)
Q: Would the task sequence continue after reboot if no one logged on?
A: Yes, it will continue until completion.
Q: In order to use the TSs without installing the OS; you need to create a custom one and do not select a Boot Image, right?
A: Yes, correct.
Q: you showed how you can determine if an application is installed by WMI query add/remove programs. Is there a way to query if a particular program was successfully installed via a SCCM advertisement in a task sequence?
A: The best way to approach something like this is to check the SCCM client’s registry location for the Program’s last execution status. You would need to write a script to get all list of the all the sub keys of the Package’s execution history and then check if the last status equaled “success”. Unless there is a very specific reason to check for that, I’d recommend the KISS principle. Note, those registry keys are within HKLM\SOFTWARE\Microsoft\SMS\Mobile Client\Software Distribution\Execution History\PackageID\
Q: How do you deal with network share permissions when running setup from shares? What rights are needed?
A: Use the step Connect To Network Folder – http://technet.microsoft.com/en-us/library/bb632337.aspx
Q: How do you assign a task to a collection?
A: It’s really simple – http://technet.microsoft.com/en-us/library/bb680317.aspx
Q: What is the limitation to how many TS actions and\or TS Groups that can be in a task sequence?
A: The only limitation is that the XML cannot be larger than 10 MB
Q: Where do you define what boot image it will boot to?
A: That is a good question, which I forgot to show in my demo. Simply right-click on the task sequence and go to Properties. It’s then on the Advanced tab
Q: The installed software condition in the TS, can that be used to re-installed non- standard software in an XP to 7 refresh?
A: The question I ask is what defines non-standard software? If that means the software isn’t packaged in SCCM, then no SCCM can’t do reinstall the software. Otherwise if it is packaged, then you would need to write custom scripts to detect for the software and write true/false into custom variables for later use in the task sequence. Or use MDT 2010 with UDI or some other similar solutions.
Q: can a task sequence be customized to change the language of the OS install?
A: You can certainly add a language pack into an OS deployment – http://t3chn1ck.wordpress.com/2012/01/13/how-to-add-a-language-pack-to-win7-osd-without-mdt/
Q: I ask because we currently are using images for x86 and x64 plus x86 and x64 in Spanish. Can a task sequence be setup to install the os language of choice?
A: Yes J
Q: Is the script for the install software updates fix available for download somewhere?
A: That script is available on my blog at http://t3chn1ck.wordpress.com/2012/01/26/vbscript-to-run-sccm-software-updates-scan/
Q: Can you guy please email or upload somewhere xml for the TS Demo 12 as well as Custom HTA???
A: I will upload demo 12 as part of future blog post, so feel free to sign up for email updates on my blog. Otherwise, a similar custom HTA can be found on my blog already at http://t3chn1ck.wordpress.com/2011/09/22/osd-options-chooser-v2/
Q: Nick – were or what is the best resource to learn this more extensively
A: The Microsoft SCCM documentation team has already done a great job at this. However, the best place to learn is from interacting with your peers. Personally, I found that I like the MyITforum email lists http://myitforum.com/myitforumwp/support/email-lists for ConfigMgr 2007 and MDT/OSD, of which you’ll find me there J
Q: Any good resources on developing .hta files for TS? That is something I’ve wanted to do be haven’t had time to research.
A: I’ve used Microsoft’s HTA Helpomatic – http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=17332
Q: Will all the demo scripts be available?
A: I plan to do a series of blog posts on all the content from this presentation, so feel free to sign up on my blog to receive email updates.
Q: What’s the best variable to use when setting the machine name of a computer when reimaging a computer that exists in the ConfigMgr console already (OSDComputerName or another one)? I always have issues where one or the other always contains the old name.
A: I recommend using unknown computer support because advertising a LIVE task sequence to ACTIVE computers is just asking for trouble. So then if the computer is “unknown” it doesn’t have a record in SCCM, so OSDComputerName will work great. http://technet.microsoft.com/en-us/library/cc431374.aspx
Q: Question. Do you have any experience trying to install an OS with no touch installation? I mean boot to PXE, press F12 and not having to do anything else to start the TS. This is really valuable when installing an OS on multiple PCs. Thanks.
A: I do not have personal experience doing it in production. The question becomes how you are going to assign a computer name or any one-off applications. If you just wanted the PC to retain the generic name of MININT-RandomString, then this will work easily by making the advertisement mandatory with a deadline in the past. Otherwise, you would need to either manually import the computer with its MAC address into SCCM along with the name you want it to have (which is FAR more work and is a pain). Or you would need to have a script that would query a script to retrieve a computer name from a spreadsheet or something. It is possible, but I prefer the quick and easy approach which is a 10 second entry of a computer name that then sets OSDComputerName.
Q: Could you explain why one would do multiple apps this way, rather than run each app as separate steps?
A: If the task sequence exceeds the limitation of the XML larger than 10 MB
Q: Can you share the Office template?
A: I plan to do a series of blog posts on all the content from this presentation, so feel free to sign up on my blog to receive email updates.
In one week from today – on March 28th – I will be presenting for BDNA’s SCCM Guru webcast series on the power of SCCM task sequences. To sign up for the webcast, visit the registration page at http://info.bdna.com/20120328Webcast-SCCMGuru-NickMoseley_RegistrationPage.html. Additionally, this Friday, I am presenting a bulk of my material to our Denver-area Microsoft Enterprise Management User Group. If you’re here, please come!
SCCM task sequences are most commonly used for operating system deployment. They have tremendous power and usefulness, which are often unknown, overlooked, and underutilized.
In this presentation, we will explore various aspects of task sequences and demonstrate ways that they can be used in your day-to-day administration of SCCM – including uses outside the realm of deploying an OS!