/build/static/layout/Breadcrumb_cap_w.png
05/22/2019 128 views

Hi all,

I am trying to put together an query that will give me the user of a device that has two applications installed.

So far I have this below, but not quiet working.

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_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_R_SYSTEM.ResourceID IN(SELECT SMS_R_SYSTEM.ResourceID from SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "%APP2%") AND SMS_R_SYSTEM.ResourceID IN(SELECT SMS_R_SYSTEM.ResourceID from SMS_R_System   inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "App1")


Once i have this working I then can take the users out of the AD group for App1, so going forward users will only be in App2 AD Group. 

0 Comments   [ + ] Show comments

Comments


There are no answers at this time