SCCM Query help
on your 2nd point your understanding of what I need to achieve is correct. based on ad usergroup( which pulls all users into collection) and you want to expand this with criteria operating system and processor you can not achive the results via this way because users and computers compeltlty different class types.you can not merge users and computers into one collection. you are querying the users based on user sec group and you can not fiilter the resutls based on operating system (u wll get blank results). //Eswar Koneti @ www.eskonr.com
June 20th, 2011 3:18pm

Hi, Hope someone can help, as I'm having a little problem with a query. We currently build collections based on AD User group, then advertise and target that collection, easy enough. I now need to add to that, and expand the query that it not only builds the collection on AD User group, but also Operating System and Processor archtitecture . EG AD group = GroupABC , WIndows XP, x64. I'm not having any luck doing this, can someone point me in the right direction? Thanks in advance
Free Windows Admin Tool Kit Click here and download it now
June 20th, 2011 6:37pm

can you add the first part of the query, that way we can build from that.Kent Agerlund | My blogs: http://blog.coretech.dk/author/kea/ and http://scug.dk/ | Twitter @Agerlund | Linkedin: /kentagerlund
June 20th, 2011 6:49pm

doh sorry.... these essentially are the 2 queries that need to be joined, linked or made into a single query. I've tried all sorts, even tried a UNION to link the 2 which i new wouldn't work ;). I also work directly in sql for my queries hence the difference from normal wql.. select useg.usergroup_name0 from v_R_UserGroup useg where Useg.Usergroup_Name0 like 'xxxxxx%' select SYS.Name0, sys.user_Name0 from v_r_system sys join v_GS_PROCESSOR PRO on PRO.resourceID = SYS.ResourceID join v_GS_OPERATING_SYSTEM OP on OP.resourceID = SYS.resourceID where PRO.AddressWidth0 like '32%' AND OP.Caption0 like 'Microsoft Windows 7%'
Free Windows Admin Tool Kit Click here and download it now
June 20th, 2011 7:13pm

You could try starting with something like 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_PROCESSOR on SMS_G_System_PROCESSOR.ResourceID = SMS_R_System.ResourceId where SMS_R_System.SystemGroupName = "Domain\\MachineGroup" and SMS_G_System_PROCESSOR.AddressWidth = 64 and SMS_R_System.OperatingSystemNameandVersion = "Microsoft Windows NT Server 6.1" Works for me (WS2008R2 machines and 64 bit OS selected)Miguel Rodriguez
June 20th, 2011 7:38pm

the quiries you posted are SQL quiries (used in reports) not WQL quiries(used in collections).can you post the collection query which u are using now ? you have a collection based on ad usergroup( which pulls all users into collection) and you want to expand this with criteria operating system and processor ? i could be wrong here//Eswar Koneti @ www.eskonr.com
Free Windows Admin Tool Kit Click here and download it now
June 20th, 2011 7:39pm

Hi, Your query will work because the AD group you are targetting is a SYstem group. the problem I have is targeting a USer Group instead, and that's where this all falls down. :(
June 20th, 2011 7:42pm

But you cannot group users by operating system architecture nore version afaik....Miguel Rodriguez
Free Windows Admin Tool Kit Click here and download it now
June 20th, 2011 7:46pm

the quiries you posted are SQL quiries (used in reports) not WQL quiries(used in collections).can you post the collection query which u are using now ? you have a collection based on ad usergroup( which pulls all users into collection) and you want to expand this with criteria operating system and processor ? i could be wrong here //Eswar Koneti @ www.eskonr.com Yes you are correct about SQL and WQL, as I mentioned. It's much easier and quicker to work and build queries in SQl before transferring them over into WQL. on your 2nd point your understanding of what I need to achieve is correct. based on ad usergroup( which pulls all users into collection) and you want to expand this with criteria operating system and processor
June 20th, 2011 7:47pm

Thanks Eswar... i had a feeling this wasn't achievable :(
Free Windows Admin Tool Kit Click here and download it now
June 22nd, 2011 6:37am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics