Export Task Sequences, Packages, Baselines with Logging

Ok, so I’ve been spending a lot of time manually exporting things from my Lab and uploading.  So this morning I was like… I’m done, I’m scripting this.  So a couple hours later, this is what I got.
While this exact script probably isn’t useful to many, there are parts that might be, as well as some examples of how to do exports.

I was really hoping to figure out doing a compare of the TSObject.Sequence between the two runs so I could see exactly what steps had changed… but haven’t figured that one out yet.

Anyway… here it is..

What it does

  • Loops through the Task Sequences & Packages I’ve specified.
  • Creates the Directory Structure and Exports each
  • Imports Exported XML from Last Run
  • Exports the XML data for each to “LastRun” Folder
  • Compares Current Task Sequences & Packages against last run to determine if there as been any changes.
  • Logs Task Sequences and all References for each TS
  • Logs Comparison of Current & Last Run
  • Logs Changes

The Exports of the TS includes dependancies but NOT Content.  All Content needed in the Task Sequences (Besides the Upgrade Media) Is exported separately.

What does it look like in action?

image

image

image

image

image

image

Logs:  WaaS_TS_Export.log – Shows all Exports & References along with Date Modified & Version
image

image
image

One log that shows only the changed items
Date_WaaS_TS_ChangeLog.log
Date_WaaS_TS_CompareExportlog.log

image

 

Code:

 

Update 2019.06.19
I've added Automatic change Logging for Package Differences as well.  It will now "Suck in" all of the package contents, and tell you the files that have changed from the last upload to the current upload.

This script also opens FTP connection and uploads the Zipped content.

 

 

GARYTOWN.COM

1 thought on “Export Task Sequences, Packages, Baselines with Logging”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.