Skip to content

How to query System and User resources at once

Featured Replies

I am trying to query the computer name and user's department info using one query. If possible, let me know. Thanks

Select Distinct

CS.Name0 ‘Machine Name’,

CS.UserName0 ‘User Name’,

RU.Full_User_Name0 ‘Full Name’,

UOU.User_OU_Name0 ‘Users OU’,

RA.IP_Subnets0 ‘Subnet’

From v_Gs_Computer_System CS

Join v_RA_System_IPSubnets RA on RA.ResourceID = CS.ResourceID

Join v_R_User RU on RU.Unique_User_Name0 = CS.UserName0

Join v_RA_User_UserOUName UOU on UOU.ResourceID = RU.ResourceID

Where UOU.User_OU_Name0 = ‘DomainName.COM/OuName’

Order by CS.Name0, CS.Username0, RU.Full_User_Name0, RA.IP_Subnets0

 

 

IP subnet part is an additional info here

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.