Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Automated Collection Subscription Tool v1.1

Created: 25 Jun 2007 • Updated: 16 Oct 2008 | 15 comments
Screenbert's picture
+3 3 Votes
Login to vote

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.

Click to view.

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:

  1. Redesigned user interface to allow user to resize the window.
  2. Adjusted tab order.
  3. 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.

Comments 15 CommentsJump to latest comment

EMercado's picture

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. :)

0
Login to vote
Screenbert's picture

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

Screenbert

0
Login to vote
EMercado's picture

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. :)

0
Login to vote
jasoncordell's picture

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

+1
Login to vote
Screenbert's picture

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

Screenbert

0
Login to vote
jasoncordell's picture

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

0
Login to vote
jasoncordell's picture

Thanks for the new version Screenbert. Once again, you have made my life easier.

Jason

0
Login to vote
Screenbert's picture

Glad everything is working for you.

Screenbert

Screenbert

0
Login to vote
Robert Lundsten's picture

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

0
Login to vote
MarioR's picture

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!

0
Login to vote
Screenbert's picture

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

0
Login to vote
MarioR's picture

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

0
Login to vote
brocade's picture

Great tool - I will take it for a spin

+1
Login to vote
bokfon's picture

Thanks for a great tool!!!! It works great!!!!

0
Login to vote
phillyfish's picture

This is exactly what we are looking for in our 7.1 environment but it looks like it won't complete...  It opens and lets us put in the computer names etc. but fails on the collection gathering.  See below:

11/15/2012 4:46:08 PM: Old PC Guid is 6afa8745-32f6-4181-8ac9-e39701db7394..
11/15/2012 4:46:08 PM: New PC Guid is 7918246b-a545-45da-9b01-04cd5a5b724e..
11/15/2012 4:46:08 PM: System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: http://Altiris.ASDK.NS.com/ExecuteNSDatabaseQuery.
   at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
   at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
   at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response)
   at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing).

Am I missing something obvious?  Looks like it is trying to do something with NS.com which I don't understand. 

"If you want to change the world, find a better way to do something and have everyone follow it." John Buckman - BookMooch.com

0
Login to vote