Some special characters in deployment type name cause applications not to Install

I recently stumble upon a bug in ConfigMgr that can cause issues with application deployments so that applications won’t install. When you are creating and application and gets to the step where you are supposed to create a Deployment type and you give the deployment type a name containing some certain special characters this will cause you not to be able to install the application when deployed to a collection.


Following special characters have been tested and won’t cause any issues:

/ & ! # @ –


These special characters will cause issues:

\ ”



Here you have an example where the Name field contains a backslash “Install\Uninstall”.




When trying to Install the application that contains the backslash character it can look like this where it just keeps saying “installing..” and won’t continue until you go to another pane and back and you will see the “Install” button again



Here’s a another example with different app but with the same scenario for the deployment type name and it can show up is with an error message like this:





And in some instances the application won’t show up at all (app that should appear is WinRar 5.4.0)



Here’s a short video showing off the issue





So whats the workaround if this happens? Well it’s pretty simple actually.

Just rename the deployment type and remove the special character that caused the issue and let the client run an application deployment evaluation cycle and the installation will continue just fine.


Se which special characters that i found so far that will work and won’t work in the beginning of this post.


Bug report has been filed to Microsoft



That’s all for now and Until next time, cheers !

You can also find me over at



#application-install-issue, #bug-report, #configmgr, #configmgr-bug, #deployment-type

Powershell script to output every direct rule WMI query used by device collections in ConfigMgr

I want to share a script that came about after i wanted to get hold of all the WMI-queries that’s been created and used for populating different device collections without need to go in to every single one of them and extract the query manually. Especially if you are dealing with larger environments who might have hundreds of device collections and first of all figuring out which one actually uses WMI-queries and who doesn’t.


What do we want to achieve

Extracts all the WMI-queries used in SCCM and outputs them in to a .txt files for each Device Collection.


The Script


	 Created on:   	3/30/2017 
	 Created by:   	Timmy Andersson
	 Contact: 	@Timmyitdotcom
		Extracts all the WMI-queries used in SCCM and outputs them in to a .txt files for each Device Collection. 
[CmdletBinding(DefaultParameterSetName = 'DestinationPath')]
	[Parameter(Mandatory = $true,
			   Position = 1)]

	[String]$Filepath = $DestinationPath
	$SiteCodeObjs = Get-WmiObject -Namespace "root\SMS" -Class SMS_ProviderLocation -ComputerName $env:COMPUTERNAME -ErrorAction Stop
	foreach ($SiteCodeObj in $SiteCodeObjs)
		if ($SiteCodeObj.ProviderForLocalSite -eq $true)
			$SiteCode = $SiteCodeObj.SiteCode
	$SitePath = $SiteCode + ":"
	Import-module ($Env:SMS_ADMIN_UI_PATH.Substring(0, $Env:SMS_ADMIN_UI_PATH.Length - 5) + '\ConfigurationManager.psd1')
	if (-not (Test-Path $DestinationPath))
		new-item -Path $DestinationPath -ItemType Directory -Force
	Set-location $SitePath
	$AllDC = (Get-CMDeviceCollection).Name
	Foreach ($Devicecollection in $AllDc)
		$CollectionMR = Get-CMDeviceCollectionQueryMembershipRule -CollectionName "$Devicecollection"
		if ($CollectionMR -ne $null)
			$Query = $CollectionMR.QueryExpression
			Out-File -FilePath "$DestinationPath$($Devicecollection).txt" -InputObject $Query



Run this script from your Site server, only variable you need to pass through to the script is the destination path you want the source files to be output to

Note: If the folder doesn’t exist the script will create it for you


Get-DeviceCollectionsQueries.ps1 -DestinationPath "C:\Temp\Queries\"

When the script is finished go to your destination folder and you will find the all the different device collections and their WMI queries.


Until next time, cheers !

You can find me over at

#configmgr, #device-collections, #powershell, #sccm, #wmi