Delete all packages from DP

Delete all packages? This should do it.

(replace MyLABServer) with site servername, and LAB with site code (in powershell 2.0):

$pkgs = gwmi sms_package -computer MyLabServer -namespace rootsmssite_LAB

$pkgs | % {$_.Delete()}

This does all classic packages.  If you want to do others, you’ll have to change the class – sms_DriverPackage, sms_ImagePackage, etc…

Feel free to comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.