Ahhh! The sky is falling! The sky is falling! How many times has the helpdesk accused patches of "breaking" something and you need to be able to quickly view what collections you have applied the patch to and also quickly disable/enable the patch?
(Seems to have happened to me on a regular basis at the last two companies I worked at.) So here's a Web page that let's you select from all patches with a task and quickly do all those things without winding your way through the console.
Click to view.
If you haven't ever done any Web programming, don't be intimidated. If you've done batch or VB scripting, you can muddle your way through it.
You'll need the following to use it:
If you haven't created any Web pages using the ASDK yet then follow the instructions found in the help file under "Creating and Using Proxy Classes" before you start using this Web page. That will set up the interface from the IIS server to the NS server. It will create some class files that you need to put in a APP_CODE folder where you house these files.
Also there may be one line in the code that you will change for your environment.
Verify that your Patch Management Folder Guid -- The one labeled Microsoft -- is the same as the one below. If not, modify the Altiris_PatchMgmt.aspx.cs file with your guid.
Guid guidPatchFolder = new Guid("{21c32410-ed2c-4bf4-80fb-b1a72a0e5aba}");
I tried adding a function to allow you to add and remove collections, but currently the ASDK does not support changing collections on Patch tasks. I'm hoping there will be a Patch Management ASDK piece released soon. I'll be posting more. If you have ideas be sure to post a comment on what you would like to see.
NSServer="testserver"BulletinName="MS08-036"'---------------------------------------' Setup management objects'---------------------------------------set SoftwareBulletins = CreateObject("Altiris.ASDK.PatchManagement.SoftwareBulletins")SoftwareBulletins.TargetServer = NSServerSoftwareBulletins.Authenticate()set SoftwareUpdateTasks = CreateObject("Altiris.ASDK.PatchManagement.SoftwareUpdateTasks")SoftwareUpdateTasks.TargetServer = NSServerSoftwareUpdateTasks.Authenticate()set itemManagement = CreateObject("Altiris.ASDK.NS.ItemManagement")itemManagement.TargetServer = NSServeritemManagement.Authenticate()'-------------------------------------------------------------' Get the list of Guids that match the collection and bulletin name'-------------------------------------------------------------CollName="All Windows Computers with Software Update Agent Installed"Collectionguid = itemManagement.GetItemsByNameAndType( CollName, "collection" )SoftwareBulletinPolicy = itemManagement.GetItemsByNameAndType(BulletinName,"Altiris.PatchManagementCore.Policies.SoftwareBulletinPolicy")msgbox SoftwareBulletinPolicy(0) & "," & Collectionguid(0)result = SoftwareUpdateTasks.RemoveCollectionFromSoftwareUpdateTask(SoftwareBulletinPolicy(0),Collectionguid(0))