top of page
  • Writer's pictureshishir kushawaha

PowerShell Script: Generate Task Sequence Information

In this blog post, we will explore a PowerShell script that can be used to generate detailed information about a task sequence in MECM (Microsoft Endpoint Configuration Manager). The script retrieves important information such as the OS image, boot image, driver packages, optional components, task sequence, run command line, driver packages, application list, package list, network settings, and task sequence groups. The information is then formatted into an HTML report for easy readability.

Objective

The objective of this script is to provide a quick and easy way to understand the details of a task sequence without having to navigate through the SCCM console and explore each step individually.


Execution

To execute the script, ensure that you have access to the MECM management point and run the script with administrative privileges.


Script Overview

The script begins by initializing the SCCM connection and prompting for the task sequence package ID. Once entered, it retrieves the following information from SCCM:

  • OS Image: Retrieves information about the operating system image used in the task sequence, including name, description, version, package ID, source path, and more.

  • Apply Operating System Step: Retrieves information about the Apply Operating System step in the task sequence, including the image package ID, image index, destination variables, destination disk, destination logical drive, destination partition, config file name, and config file package.

  • Upgrade Operating System Step: Retrieves information about the Upgrade Operating System step in the task sequence, including the driver package ID, install package ID, install path, OS product key, and staged content.

  • Boot Image: Retrieves information about the boot image used in the task sequence, including name, package ID, source date, scratch space, package source path, pre-execution command line, pre-execution source directory, package size, image index, image path, and image OS version.

  • Boot Image Driver Information: Retrieves information about the drivers integrated into the boot image, including localized display name, driver version, and CI ID.

  • Boot Image Optional Component Information: Retrieves information about the optional components installed in the boot image, including name and dependent components.

  • Download Package Content: Retrieves information about the package content downloaded during the task sequence, including package name, package ID, size, count, and properties.

  • Integrated Packages: Retrieves information about the software packages integrated into the task sequence, including package name, package ID, package type, version, and package source path.

  • Driver Packages: Retrieves information about the driver packages integrated into the task sequence, including package name, package ID, package type, version, and package source path.

  • Integrated Applications: Retrieves information about the software applications integrated into the task sequence, including application name, package ID, package type, version, and data source path.

  • Driver Package Integrated: Retrieves information about the driver packages integrated into the task sequence steps, including name, driver package ID, enabled status, description, and unsigned driver flag.

  • CommandLine Added: Retrieves information about the run command line steps in the task sequence, including name, package ID, command line, description, and continue on error flag.

  • Network Settings: Retrieves information about the network settings applied during the task sequence, including name, domain name, and domain OU name.

  • Task Sequence Group: Retrieves information about the task sequence groups in the task sequence, including name, description, condition, and enabled status.

Once all the information is retrieved, the script generates an HTML report with all the details organized in a tabular format like below.

Please find the script uploaded at GitHub.

Conclusion

Using this PowerShell script, you can easily generate detailed information about a task sequence in SCCM. This information can be valuable for understanding the task sequence without manually exploring each step.

558 views0 comments

Recent Posts

See All

PowerShell to list device collections membership

The collections membership feature for a device is already available in the SCCM admin Console. However here's a handy piece of PowerShell that will quickly tell you what collections a device is a par

bottom of page