Video Screencast Help
Give us your opinion and win with Symantec! Please help us by taking this survey to tell us about your experience with Symantec Connect, so that we can continue to grow and improve.  Take the survey.

Assigning Asset Owner value based on Primary User

Created: 06 Dec 2012 • Updated: 02 Jan 2013 | 9 comments
This issue has been solved. See solution.

We have a few thousand computers that have inventory reporting on the Primary logged in user for computers and we'd like to have the Asset Owner field mirror this value as a one-off. In other words, we'd run a job once that would populate this initially empty Asset Owner field but in the future would need to maually modify the Asset Owner field if needs to change.

If the previous was unclear: There is a built-in task that sounds similar "Assign Computer’s Ownership to be the Primary User" but that actually works the other way around by changing the Primary User field (AeX AC Primary User) based on what is already in the Asset Owner field. If anyone can tell me how I can make the opposite happen what would be great.

Comments 9 CommentsJump to latest comment

Brillow32473's picture

If you are wanting to update the Primary Owner with the Asset Owner you can make this change with a CMDB rule.  You would just right a query to check to see if the Primary user does not match then update the User ID and Domain with the Asset Owners information.

The one thing is that when a workstation sends basic inventory it will over right the data in hte Primary User data class.

Chad_GCU's picture

This would be a one time deal as we're not importing our data from a previous inventory database and it would be handy going from desk to desk having at least the computer (i.e. anything with Altiris Agent installed on it) have an Asset Owner already assigned to it by polling whatever is current showing as the primary logged in user.

I wouldn't want this to be constant for the reason you stated.

Personally I don't understand why the built-in task does the opposite. Why would I want the Asset Owner value to replace the Primary User when that value is most up-to-date via the agent? Having it do what I'm suggesting would be both helpful for those who benefit from as much data as the agent can provide as well for new assets that were not properly scanned/registered to assign it based on who is the primary user (at least as a stop-gap until full confirmation of asset ownership).

EMercado's picture

Are you sure that's how the built in task works? I remember using that in task in 6.5 and it taking the data in the Primary User field and updating the Asset Owner resource assocation. It would be extremely unusual for ANY Altiris process to update inventory data outside of Inventory solution.

Chad_GCU's picture

Note: This task does not set the Primary User to be the Asset Owner, which it sometimes is incorrectly thought to do.

It's possible that I'm misreading the article, but I had opened up a case with Symantec around the time I posted this thread and their statement was that there wasn't an option for what I was looking for and that my request would fall under a new feature request.

I tested out this task on a PC that had a barcode, serial number, and everything else Altiris reports (by syncing inventory data to asset via another built in task) and the Asset Owner remained empty despite the Primary User field being populated prior to running the task.

Brillow32473's picture

The Task "Assign Computer's Ownership to be the Primary User" functionality is to go and Compare the Users in the Database to the Domain and User id that is kept in the table for the Primary User (AeX AC Primary User).  If it finds a match then it should set the Asset Owner to the user that matches.  If it does not find a match in the Users table then it can not set it.  Also when it pulls the data to compare it only does it for the current month.  So if the resource has a primary user but it is not from the current month it will not set it as well.

so if these conditions are not met this could explain why it was not being set.

Chad_GCU's picture

Interesting. I wonder why my Symantec support rep didn't make this clear. I'll look into it further and mark this as the solution if I find one of those criteria missing in the assets I was testing with.

By the way, is there a way to extend the time it will allow Primary User data to be relevant?

Brillow32473's picture

There is not away to extend the time to allow the Primary User data to be relevant.  That part of it is hard coded into the solution.

Chad_GCU's picture

Ok so we found the problem, but the issue is that the solution requires leveraging someone with a bit more SQL prowess (i.e. not me).

Here's the situation:

Users are currently logging in with our production domain example ABC, but the users we've imported are from the domain we're moving to: XYZ.


ABC\John.Doe is the AeX AC Primary User aka "Primary Account"

- We want the Asset Owner field to mirror this value.

Altiris does not find ABC\John.Doe from the list of available user resources and doesn't know how to identify the user resource XYZ\John.Doe as the same user and assign that as the Asset Owner.

To be clear: Importing the ABC users is not an option and would be a bit long winded to explain why we're not importing them.

Is there a SQL solution (data connector, resource association, etc) that we can use to have it ignore the "Domain" field and simply try to match the user name field?

Brillow32473's picture

To do this you will need to use data connector and I would also suggest to create a custom data class that contains the domain/user name for XYZ. For my suggestion it would require that the UserID for ABC and XYZ match.

If they match then here is what you can do.

Create the custom data class and then add it to the Computer Resouce Type.

Create a Data Source that pulls the data that you need. Below is a sample query on getting the data.

select ad.[User id], ad.Domain, u.[Display Name]
from Inv_AeX_AC_Primary_User pu
join Inv_Alternate_Domain ad /*Custom Data Class*/ on pu.[User] = ad.[User id]
join vUser u on ad.[User id] = u.Name

then you will use this data source with an import export rule. In the rule you will then set the data for Ownership Details and the Associaiton for Asset Ownership.

Once this is set up you can run this on a schedule and you will be able to the owner using the XYZ user and domain.