none
SCCM 2012 How to create a Device Collection query based on Operation System Language?

    Question

  • Hi All, I need to create a Device Collection on my SCCM 2012 to find all the machines with Windows in Spanish, other for English and other for Portuges.

    I've been trying to create a query for that, but I can't find the correct field where the OS languge is.

    If I go to a device resource explorer, I found on Hardware\Operation System\ there is a column called OS Language, but I couldn't call this field from the collection query.

    I apreciate your help in advance.

    German.

    Wednesday, January 09, 2013 6:36 PM

Answers

All replies

  • That's odd and I'm seeing the same in my lab -- specifically that "OS Language" is not listed in the attribute list.

    If you directly modify the WQL, you can add OSLanguage though:

    select SMS_G_System_OPERATING_SYSTEM.OSLanguage, SMS_R_System.Name from  SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId


    Jason | http://blog.configmgrftw.com

    Wednesday, January 09, 2013 6:57 PM
  • Hi Jason, Thanks for your answer.

    I just created two new device collections with these queries, but it dosen't found any machine. I'm sure that the origin collection has machines on thats languages.

    Any suggestion?

    select SMS_G_System_OPERATING_SYSTEM.OSLanguage, SMS_R_System.Name from  SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId
    where SMS_G_System_OPERATING_SYSTEM.OSLanguage like "Eng%"

    select SMS_G_System_OPERATING_SYSTEM.OSLanguage, SMS_R_System.Name from  SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId
    where SMS_G_System_OPERATING_SYSTEM.OSLanguage like "Portu%"

    Regards, German.

    Wednesday, January 09, 2013 7:38 PM
  • I don't know what the possible values are so can't say for sure. You should run a generic query first (like the one I posted above) to retrieve all possible values and then you can properly populate your condition with exact values.

    Jason | http://blog.configmgrftw.com

    Wednesday, January 09, 2013 8:38 PM
  • Hi,

    SMS_G_System_OPERATING_SYSTEM.OSLanguage like "Eng%" won't work as the possible values are like 1033 = English - United States, 2070 = Portuguese - Portugal.

    You can see the different codes here: http://www.science.co.il/language/locale-codes.asp

    There might be other ways to accomplish this.

    • Marked as answer by German Jausoro Thursday, January 10, 2013 1:39 PM
    Thursday, January 10, 2013 8:39 AM
  • Hi Michael

    Thanks a lot for your help. you was rigth, I changed the name for the numeric code, and it works perfect.

    These are the query I used:


    select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.OSLanguage = "1033"

     

    select SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client from  SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.OSLanguage = "1046"

    Best Regards, German.

    Thursday, January 10, 2013 1:39 PM