There are parameters for the error title, error message/details, exit code, a timeout, and a force reboot. This wills how the typical “Error in the Task Sequence” Window. If, for whatever reason, you wanted to manipulate the progress bar without adding the “second/bottom” bar, this is what you should use.Ĭalls “ShowErrorDialog()” on the COM object. This function manipulates the “Top part” of the progress bar. Show-TSProgressĬalls “ShowTSProgress” on the COM object. This will automatically reappear once the current step has completed, or if you call one of the “show” functions for the UI. Closes or “hides” the progress bar window. Step Param set to 5, MaxStep Param set to 10.Ĭalls “CloseProgressDialog()” on the COM object. Personally, I don’t find them useful enough to include. With this function, those use the built-in variables “designed” to be used here. If you want to extend this function to allow those additional parameters, feel free. There are other parameters here with “ShowActionProgress()”. I can pass in 8, and 400, and the COM Object does the math for us. For example, if i have 8 of 400 complete, I don’t have to do the extra scripting to pass in “2” and “100”. The neat thing here, is that the “Step” and “MaxStep” will automatically show a “100%” representation. This will add the “second” progress bar and update the Text for that progress bar as well as fill the progress meter as you see fit. This is the function I use 99.9% of the time for UI related actions. Show-TSActionProgressĬalls “ShowActionProgress()” on the COM object. This function is not exported, as it is used within the module to verify that the COM Object is loaded before attempting any operations. Returns an object of all Task Sequence Variables and their assigned Values. Note this is wrapped in a try/catch in the event you attempt to set a read-only variable. Set-TSVariablesĪssigns a value to a specific variable. the “Name” Parameter should be the Task Sequence Variable you want the value for. Get-TSValueĬalls “Value()” on the COM Object to return the value of a specific variable. This will return an array of all Task Sequence Variable NAMES only. Get-TSVariablesĬalls “GetVariables()” on the COM Object. This function is not exported, as it is used within the module to verify that the COM Object is loaded before attempting any operations. Some, if not most, of these are-for lack of a more appropriate label-useless but can still be fun to mess around with! I’ll run though some of the details below including visuals for the TSProgressUI items. I’ve uploaded the module for you all to use at my github. Primarily you’ll have 2 COM objects you can create during a Task Sequence: (getting/setting variables) and (manipulating the Progress and messages). Mostly for basic things like getting and setting variables, but once I noticed what all the COM Objects exposed, I wanted to take this a step further. Awhile ago I submitted a request to Microsoft for a built-in Powershell Module during the Task Sequence.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |