ASDK 7.5 - Remove Package Server assignment from packages
If you want some packages no longer being replicated to any package servers you could go in and edit this package and remove all the package servers or sites to which the package is replicated to. This can be quite a lot of work if you have many packages which you want to edit...
I was in this situation where I had many patches some of those were more than 300 MB large and I did not want those patches which were not required anymore to replicate to the remote site. I have found that this can be easily fixed using the ASDK.
So I started of using the webservice found under http://localhost/Altiris/ASDK.SMF/SoftwarePackageM... and the function SetPackageServerSettings.
I basically had to put in 3 inputs. PackageGuid, AssignmentType and AutomaticSiteAssignment. As I have "All package servers" as a standard for patches I chose to chang this to individually. So here an example of input:
This will change the assignment type from "All Package Servers" to "Package Servers individually". Leaving the other fields blank will remove all assigned sites or package servers.
This way is already much faster however it could be done even faster using a script so I packed this into a script which I have attached to this article.
Use this script locally on your Notifcation server. The following options are provided.
Running the script "cscript.exe RemovePackageServerAssignment.vbs 38918c74-21f3-2030-e3fc-655f43c3072c" will change one package.
Running the sccript "cscript.exe RemovePackageServerAssignment.vbs -f listofguids.txt" will go through a text file where you can add as many guids as you like.