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.