December 11, 2018
Copy Software Update Deployments From One Collection to Another
Recently I found my self in a situation where I was needing to copy all the software update deployments that were deployed and re-deploy them to a new collection I had just made. I had 12 deployments so I could have just deployed them manually but I had more important things to do. So I did a little digging and found two very useful commands.
The first is Get-CMDeployment and the second one New-CMSoftwareUpdateDeployment. I was able to grab all the software update deployments from collection1, then apply them to my new collection (collection 2). Below is how I achieved this and I hope it can help you one day.
cd lab: Get-CMDeployment -CollectionName "Collection 1" -FeatureType SoftwareUpdate | %{New-CMSoftwareUpdateDeployment -CollectionName "Collection 2" -SoftwareUpdateGroupName $_.softwareName -DeploymentType Available}