If you for any reason need to update all packages and applications in Configuration Manager, there are some ways to do this with PowerShell.

If you never used PowerShell with ConfigMgr before, you can start PowerShell connected to your environment from the console.

image

In most cases I use the PowerShell command prompt only, but the ISE is perfect if you want to save your commands, run line by line and run scripts.

Packages

Ok, how to I update all packages? Simply use this command, you may skip the –verbose if you don’t want any feedback.

Keep in mind that this will update ALL packages to ALL your Distribution point, this should only be used in rare cases. It will generate a lot of network traffic

Get-CMDistributionStatus | ? {$_.ObjectTypeID -eq 2 } | % { Update-CMDistributionPoint -PackageId $($_.PackageId) -Verbose }

 

If you want to split the load you can, either specify a couple of PackageIDs

(“P0100005″,”P0100001”) | % { Update-CMDistributionPoint -PackageId $_ -Verbose }

Or you can filter to all packages starting with Acro*

Get-CMDistributionStatus | ? { ($_.ObjectTypeID -eq 2) -and ($_.SoftwareName -like “Acrob*” ) } | % { Update-CMDistributionPoint -PackageId $($_.PackageId) -Verbose }

 

Applications

So over to applications, this is a bit more tricky, ’cause Update-CMDistributionPoint requires to parameters application name and Deployment type name. But still doable, look here.

Again – this will update ALL applications to ALL your distribution points, this should only be used in rare cases

Get-CMDistributionStatus | ? {$_.ObjectTypeID -eq 31} | % { Update-CMDistributionPoint -ApplicationName $_.SoftwareName -DeploymentTypeName $((Get-CMDeploymentType -ApplicationName $_.SoftwareName).LocalizedDisplayName) -Verbose }

 

If you want to split the load, and update only some applications, use filter for example all applications starting with Acrob*

Get-CMDistributionStatus | ? { ($_.ObjectTypeID -eq 31) -and ($_.SoftwareName -like “Acrob*”) } | % { Update-CMDistributionPoint -ApplicationName $_.SoftwareName -DeploymentTypeName $((Get-CMDeploymentType -ApplicationName $_.SoftwareName).LocalizedDisplayName) -Verbose }

 


Happy updating! Have comments or thoughts? Please share them either contact me on twitter, email or a comment below.

Advertisements