IT Management Suite

 View Only
  • 1.  Altiris SQL report for region and country

    Posted Apr 15, 2021 03:28 PM
    Is there a way to retrieve the location of each client? Region and Country are Windows OS informations, how to get them?


  • 2.  RE: Altiris SQL report for region and country

    Broadcom Employee
    Posted Apr 16, 2021 04:03 AM
    Edited by Igor Perevozchikov Apr 16, 2021 12:37 PM
    Good afternoon!

    You can check this discussion and there is sample sql query for similar report (If you have Inventory Solution installed and your managed clients got full inventory)
    According to current TimeZone on client PC, you can identify its country/region.

    Considered this case and tried to create something similar to have this information using custom inventory. Please check this as well https://community.broadcom.com/symantecenterprise/viewdocument/info-about-home-location-of-manag?CommunityKey=20a6a4b9-632d-4705-aa45-830768fdd05b

    Best regards,
    IP.

    ------------------------------
    Software QA Engineer
    Broadcom Inc.
    ------------------------------



  • 3.  RE: Altiris SQL report for region and country

    Posted Apr 16, 2021 09:49 AM

    Hey ItaloDM85

    If you have AD and are leveraging the Active Directory Import to import your Computer and User Object from AD you should be able to use the below SQL query to pull a Computer's Users Region and Country based on the User's AD information. This does require that the AD user objects for Country, State and/or etc. be populated!

    select
    c.name [Computer Name]
    ,case
    when len(u.[Given Name]) < 1 or len(u.Surname) < 1 then u.name
    else u.[Given Name] + ' ' + u.Surname
    end [User]
    ,u.State -->> AD User's State Object
    ,u.Country -->> AD User's Country Object
    from vcomputer c
    join ResourceAssociation ra on ra.ParentResourceGuid = c.guid
    and ra.ResourceAssociationTypeGuid = 'CEC204B6-CB9E-4D33-9FFD-55DDC62E61FD' -- primary user resource association
    join vuser u on u.Guid = ra.ChildResourceGuid --> Altiris SQL Table for User Info, populated by the AD User Import
    where len(u.state) > 1 or len(u.country) > 1 --> Optional where statement that filters out missing states or Countries, rem out with -- to exlcude
    order by 4,3,2

    regards
    William