top of page
  • Writer's pictureshishir kushawaha

PowerShell To Get MECM Applications Information

Updated: Apr 28, 2023

Objective: The goal of this script is to retrieve information on a list of applications specified in a text file. The script will gather important attributes for each application, such as detection methods and deployment settings.

Execution:

  • To execute the script, you need to first prepare a list of applications in a text file named "app_export_list.txt" and place it in the same folder as the script.

  • You must also ensure that you have access to a reachable SCCM management point.

  • Next, you should run the script with administrative privileges. The script will then connect to SCCM and retrieve application information for each application in the list.

Finally, the script will output the application information to an HTML file, which can be viewed in a web browser. It includes basic application information like name, packaged, version including command line, detection methods.


Processing:

  • Uses the Get-CMApplication cmdlet to retrieve a list of applications matching a specific name ($app_name).

		$pkg_info=Get-CMApplication-name $app_name
  • Uses the Select-Object cmdlet to collect various properties of the application, such as display name, package ID, description, and creation and modification dates.

$pkg_info| select                 LocalizedDisplayName,PackageId,LocalizedDescription,SoftwareVersion,NumberOfDeployments,NumberOfDeploymentTypes,Manufacturer,CreatedBy,DateCreated,DateLastModified,CI_ID,CI_UniqueID,IsSuperseded,IsSuperseding
  • Uses the Get-CMApplicationDeployment cmdlet to gather information on the deployment of the application, such as the assignment ID, assignment name, target collection ID, collection name, creation time, and start time.

$app_deployment=Get-CMApplicationDeployment-name $app_name
$app_deployment| select AssignmentID,AssignmentName,TargetCollectionID,CollectionName,CreationTime,StartTime 
  • Collects the installation and uninstallation command lines for the application deployment type by accessing the Installer and CustomData properties of the DeploymentType object.

'Data Source Path'=$AppMgmt.DeploymentType.Installer.Contents.Content.Location'Install CommandLine'=$AppMgmt.deploymenttype.installer.CustomData.InstallCommandLine'UnInstall CommandLine'=$AppMgmt.deploymenttype.installer.CustomData.UnInstallCommandLine
  • Exports the retrieved application information to an HTML. Each application will have separate .HTML file. in reports folder.

  • You can open the HTML file and view the complete details of the application. Below snapshot provides the details of VLC application.

The script allows you to quickly retrieve information on a list of applications that have been deployed through Configuration Manager. This information can be useful for troubleshooting any issues that arise with the deployment of these applications. The script can also be used for auditing purposes. This can be useful for ensuring that all applications are properly licensed and deployed in accordance with organizational policies. Furthermore, it can be used for backup purposes. By collecting information on all applications deployed, you can create a backup record of all applications. This can be useful in the event of accidental deletion, as you can use the backup information to recreate applications.


Overall, this script provides a convenient and efficient way to gather important information about applications deployed through ConfigMgr, which can be useful for troubleshooting, auditing, and backup purposes.


You can download the complete script from here. Please leave comment if you have any. #MECM #SCCM #applicationinformation #powershell #automation

1,854 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

Comments


bottom of page