Here is another script I quickly put together so that i can do a quick tidy up of our Task sequences after i moved them all into an OLD folder. Hopefully saves some time from right clicking and going through the painful process of deleting and un-deploying.

for some reason i guess due to it using the WMI Query of the host i had to do this on the actual server and not a client side.



$SiteCode = "HSC"

$FolderName = "old"

$TS = Get-WmiObject -Namespace ROOT\SMS\site_$SiteCode -Class SMS_TaskSequencePackage -Filter "ObjectPath = '/$FolderName'" | select Name



Foreach ($i in $TS)




 Remove-CMTaskSequenceDeployment -Name $




Published in SCCM 2012