Assigning a location to an Asset automatically
Hi
I have a question that I'm not quite sure how to solve, I would like under my computer assets to have a location assigned automaticly depending on the user that is logged on the PC.
All our users in KACE have a location assigned from AD, so is that possible to assign that to the computer asset automaticly by some SQL query somehow ?
Thanks in advance
- René
Answers (3)
LEFT JOIN USER U ON (M.USER_NAME = U.USER_NAME)
What exactly are you wanting from the report? If you can give me details on what all you need I might be able to help you out more.
You can include something like this in a SQL query.
SELECT user_name FROM ORG1.`USER` U where location like '%HQ%'
Comments:
-
Maybe something like this? This will pull back info for everyone that has the location of Finance.
SELECT NAME, IP, MAC, USER
FROM MACHINE M
LEFT JOIN USER U ON (M.USER_NAME = U.USER_NAME)
WHERE U.LOCATION LIKE '%Finance%'
ORDER BY M.NAME - dugullett 11 years ago -
just the bits I needed :) Thanks!!
End up with this:
SELECT M.USER, M.NAME, U.LOCATION, (SELECT MACHINE_CUSTOM_INVENTORY.STR_FIELD_VALUE FROM MACHINE_CUSTOM_INVENTORY WHERE MACHINE_CUSTOM_INVENTORY.ID=M.ID AND MACHINE_CUSTOM_INVENTORY.SOFTWARE_ID=2443) AS Language_Code
FROM MACHINE M LEFT JOIN USER U ON (M.USER_NAME = U.USER_NAME)
WHERE (M.OS_NAME = 'Microsoft Windows XP Professional') ORDER BY Language_Code, U.LOCATION, M.USER - rmeyer 11 years ago
How do you want to assign location to the computer asset.. Do you want to store the location in registry or some where else..
Comments:
-
Do you maintain any naming convention for the machine name? - jagadeish 11 years ago
Right now have have a naming convention that says:
XXYY[4 digits]
XX = Country code
YY = PC for desktop/LT for Laptop/VM for virtual machine
The problem is we have several sites in the same countrys and I would like to do some reporting on the site, I can split it into IP ranges, but we have many employees that go from site to site so the numbers won't be correct, but the users have in their "user profile" in KACE in the location field a "site/city name" that they refers to, and if it was possible to add that automaticly to the asset when a user login on the PC that would be sweet for the reports.
I hope that makes sense =)