Jump to content


Morpheus

Device collection of a user collections primary devices

Recommended Posts

I created a user collection from a AD object container.

 

Now i'd like to create a device collection of this AD user collections primary devices?

 

Does someone know how to do that?

Share this post


Link to post
Share on other sites


Yep use this query:

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_UserMachineRelationship on SMS_UserMachineRelationship.ResourceID = SMS_R_System.ResourceID where SMS_UserMachineRelationship.UniqueUserName like "domain\\username"

 

Make sure you use a double backslash \\ otherwise it won't work.

 

Alternatively, you can search any user under Users in Assets and Compliance and down in the bottom pane under Related Objects there is a option 'Primary Device' you can click to see the primary devices.

Share this post


Link to post
Share on other sites

Yep use this query:

 

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_UserMachineRelationship on SMS_UserMachineRelationship.ResourceID = SMS_R_System.ResourceID where SMS_UserMachineRelationship.UniqueUserName like "domain\\username"

 

Make sure you use a double backslash \\ otherwise it won't work.

 

Alternatively, you can search any user under Users in Assets and Compliance and down in the bottom pane under Related Objects there is a option 'Primary Device' you can click to see the primary devices.

 

Thanks. Thats the right way! But this will get my all the devices which this user has been loged in.

And with this Query i would have to enter all usernames by myself. Because of that i created a USER COLLECTION with the Users which i need. But i can't deploy this application to the USER COLLECTION. Because of that i would like to create a DEVICE COLLECTION of this Users primary devices.

Share this post


Link to post
Share on other sites

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...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...