Automated Collection Subscription Tool v1.1
ASDK wizard Screenbert heard about the bounty being offered for the creation of a nifty tool for Notification Server (NS). Looks like the bounty worked ... and so did Screenbert. Here's fruit of his labor: a tool to automatically collect subscription information using NS.
[Updated to let you execute a script at the end of each collection move. This will allow for creation of helpdesk tickets.]
Intro
This is a tool that can assist in re-imaging or other collection-based processes.
The ASDK is required to be loaded on the NS Server. It is not required on the client machines.
What it Does
- You enter the the old and new computer names.
- Collection information is pulled from NS
- Identify all collections with phrase specified under keyword in app.config XML file.
- It removes the old computer from those collections.
- It adds the new computer to those collections.
- Detailed logging for troubleshooting purposes is in the %temp%\ACST.LOG file with timestamps.
The app.config has three settings that need to modified:
NS_Server : NSSERVER.DOMAIN.COM
Search_Term : ANYTERM
Default_Domain : NTDOMAINNAME
If the search term is included ANYWHERE in the collection name, that collection is returned. Leave blank for ALL collections.
For the domain, you will need to enter the netbios name that shows under the domain column in Altiris reports. For instance the DNS domain name may be altiris.com, but the netbios domain name is AltirisNet.
You can specify a non-default domain name by putting computer.domain in the textbox for the new or old PC name.
The command variable will execute the specified exe, vbs or batch file. The command it executes must be in the same directory as the ACST executable. It will execute the command and pass these variables:
1 = Old Computer Name
2 = New Computer Name
3 = “Collection changed”
If the command variable is blank nothing happens. Otherwise it executes the command for each collection moved.
This tool is only designed for static collections.
Change Log
Version 1.1 Enhancements include:
- Redesigned user interface to allow user to resize the window.
- Adjusted tab order.
- Added ability to execute command after completion.
| License: | AJSL By clicking the download link, you agree to the terms and conditions in the Altiris Juice Software License |
| Support: | User-contributed tools on the Juice are not supported by Altiris Technical Support. If you have questions about a tool, please communicate directly with the author by visiting their profile page and clicking the 'contact' tab. |
| Attachment | Size |
|---|---|
| ACST1.1.zip | 26.38 KB |
- Login or register to post comments
- 3319 reads
- Printer-friendly version
















Nice tool Screenbert! Tried
Nice tool Screenbert! Tried it and it works great. Do you think you'd release the source code for it? I'd like to create something similar, but I figure why reinvent the wheel. :)
Source code request
I'm not saying that I won't provide the source code, (I'm not saying I will either) but I'm not going to provide the source code right now. This being the first version of the program, I figure there will probably be more updates and it really isn't mature enough yet.
That being said, if you are looking for something specific let me know and I'll see what I can do to help.
Screenbert
Source Code
I can understand that. For version 1.0 however, it's working just as it should. Hopefully jasoncordell can chime and give his feedback since he's the one who requested such a tool. :)
Getting exceptions
Hey Screenbert,
Thanks alot for your work on this tool. I am having a problem when I run this from a workstation.
I am receiving the following exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at ACST.Form1.btnSubmit_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Any clue what I need to do?
Thanks,
Jason
Exceptions
Do you have the ASDK loaded on the NS server?
Does the tool correctly from anywhere?
Can you post the contents of the log from %temp%\ACMT.log?
Thanks,
Screenbert
Found the problem
Hey Screenbert,
Found out what the problem was. Some of our live production systems had been set to retired in Asset, so they were removed from NS.
I am guessing that the error(s) that I kept running into were basically "computername not found" errors.
Once I fixed that problem, or just selected computers that actually existed, the tool did a fantastic job.
Thanks again,
Jason
Thanks...
Thanks for the new version Screenbert. Once again, you have made my life easier.
Jason
NP
Glad everything is working for you.
Screenbert
Nice tool! One question though...
Is it possible just to remove a computer from all the collections? I don't have a new PC that I want to move the collections to...
Thanks!
Robert Lundsten
Asterio AB - System Management Solutions
http://www.asterio.se
Screenbert, This tool is
Screenbert,
This tool is very nice. Thank you for this. I am currently migrating machines from SMS to Altiris and What I need to do is have an app to show all collections within the database and allow me to check or highlight and then add the NEW PC NAME into those collections I selected from the OLD PC NAME. Way I was going to approach this was to have a test PC and add it to ALL collections we have. Make that the Old PC Name and then enter in the new name (which will be the real PC I am adding) this would work if you didnt actually remove the collections from the Old PC Name and just added to the NEw PC Name. Would you possibly be able to provide a version that does this?
Thanks for the awesome work on this applet!
It's been a while
It's been a while since I wrote the tool, but you can customize the collection filter criteria. Would that work for your needs?
Screenbert
Screenbert, I am not
Screenbert,
I am not exactually sure what you are reffering to.
Ultimately what I need is something that will allow me to add a machine to multiple collections at once. If instead of moving collections from one machine to another the app could query the NS and return all collections allowing me to select the collections I want and then add them to a designated machine.
let me know if this is possible?
Thank you in Advance!
Mario