Script: set “Allow Fallback” for deployment types
If you already have created a lot of applications with many deployment types and forgot to check them to allow fallback it can be very time consuming to do this manually! Luckily we have PowerShell to help us with that.This
It will only try to change those deployment types that are of the type .MSI or SCRIPT (hence the -MsiOrScriptInstaller switch). This can be changed by using other switches. For details on which one to use and how read about it on TechNet (opens in a new window/tab).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
#************************************************************************ # Script name: Set-CMDeploymentTypeAllowFallback.ps1 # Created by: Lars Halvorsen # Date: 2014-04-24 # # Description: # Loops through ALL applications and ALL their deployment # types and tries to set them to "Allow Fallback" # Ignores deployment types that are not of the type .MSI # or SCRIPT (this is configurable) #************************************************************************ $AllApplications = Get-cmapplication | select LocalizedDisplayName Foreach ($application in $AllApplications) { Write-Host -ForegroundColor Yellow ("*** Verifying application " + $application.LocalizedDisplayName + " ***") $AllDeploymentTypes = Get-CMDeploymentType -ApplicationName $application.LocalizedDisplayName | select LocalizedDisplayName Foreach ($DeploymentType in $AllDeploymentTypes) { Write-Host -ForegroundColor White ("*** Evaluating deployment type " + $DeploymentType.LocalizedDisplayName + " ***") Set-CMDeploymentType -ApplicationName $application.LocalizedDisplayName -DeploymentTypeName $DeploymentType.LocalizedDisplayName ` -MsiOrScriptInstaller -AllowClientsToUseFallbackSourceLocationForContent $true -Verbose } } |
Enjoy! 🙂