Ok, I’ve been hanging out with Adam Gross a bit, and thought I’d steal some of his title magic for this one.
Quick Overview of what this does:
- Gathers Variables (Script to create variables similar to MDT) More info: So long MDT, Native CM* for Me
- Optional: Grab value of Registry Key Value(s) and place into a TS Variable. I use this to quickly confirm a registry value instead of having to look it up in RegEdit, I just grab the info and place it into a TS Var, which then…
- Dump Variables (to a Log File in the SMSTSLog Folder) More Info: Task Sequence Variables
- Copy Logs to Server (After compressing)
- I have two steps, very similar script but supplied different variables
(I need to re-write this so it is the same script but more parametrized.- One that will copy to a common location we have for IPU and Includes additional files / folders for IPU
- One that will copy to a Debug location of just the CCM logs
- I have two steps, very similar script but supplied different variables
- Pause
- In Windows if User is logged on
- In WinPE
This Child TS (Module) will only run if you set a Variable in the Parent TS for DebugMode
In a Task Sequence you want to debug, you add a group, one with a set TS Variable step, and set the variable(s)” to:
- DebugMode = True: This will run the DebugMode Group in the Module
- DebugMode = Pause: This will run the Pause Group in the Module
- DebugCopyLogs = Runs the Copy Logs to Share Group
There are different variables because sometimes I want to add this TS Module to a TS and run “Silent”, only grabbing the variables and logs and dumping to the file server. Sometimes I want it to Pause after it grabs the logs, and sometimes I just want it to Pause. Because it’s setup this way, you can run the Same module for different debug scenarios.
For IPU, when I want it to grab logs (Panther, CCM, etc), it has several conditions to know it’s running one of my IPU task sequences:
Otherwise, it will copy CCM to a different location
For the Pause Steps, there is a Group which makes sures it’s not running in WinPE, checks if Explorer process is running and that the DebugMode = Pause is set
Pause Step: This will close the Task Sequence Progress UI (since it’s annoying) and launch a command prompt, which you can then launch PowerShell or ISE.. or anything really
Requires Service UI (From MDT)
So now if you run the Parent TS, you’ll get your logs & your pause to test scripts, or check logs… etc.
In action: It Paused, I launched CM Trace and opened the Variables Dump File.
Here I opened the SMSTS.log file to troubleshoot why it wasn’t copying the logs files over to the server… and found it was because I hadn’t updated the script to use the new file server name.
Ok, now that I fixed that… here is the logs:
Here I opened PowerShell ISE and am testing a script. Since I’ve triggered it from the Task Sequence, all of the TS Vars are available in the script, so I can test & debug a script to make sure it’s providing the output I’d expect:
Hopefully you find this information Helpful, and can use this to help debug / troubleshoot your task sequences.
Download TS & Scripts as part of the 1809 WaaS TS Collection here: WaaS 1809 TS Collection
GARYTOWN.COM
Hey man, love your blog! I don’t suppose you have a write up on how to best perform Windows 7 to 10 in place upgrades? I am having varied degrees of success in my early testing. With Mcafee drive encryption and a million other hurdles in my way I’d be keen to see how you have tackled this in your environment? Do you have some recommendations or a suitable task sequence as a starting point i could look at?
Sorry for delay. I don’t have anything written for 7 to 10, I haven’t tried that in years. Our 10 to 10 should work for the same process with minor modifications, I know others have taken our TS and customized it to work for 7 to 10.