Quantcast
Channel: Configuration Manager 2012 - Application Management forum
Viewing all articles
Browse latest Browse all 4762

Creating a USER collection based on DEVICE location using USER DEVICE affinity

$
0
0

I am attempting to create a USER COLLECTION based on USER WQL.  I am attempting to identify users at specific BOUNDARIES [subnets] using user device affinity.  I am able to create the SQL for this as follows:

SELECT COLL.ResourceID, COLL.Name, VIP.IP_Addresses0,VSYS.User_name0, VSYS.AD_Site_Name0, VSYS.Distinguished_Name0, VSYS.Last_Logon_Timestamp0

FROM [CM_C01].[dbo].[v_CM_RES_COLL_C0100340] AS COLL

INNER JOIN [CM_C01].[dbo].[v_R_System] AS VSYS ON VSYS.ResourceID = COLL.ResourceID
INNER JOIN [CM_C01].[dbo].[v_RA_System_IPAddresses] AS VIP ON VIP.ResourceID = COLL.ResourceID
WHERE VSYS.User_Name0 IS NOT NULL AND
VIP.IP_Addresses0 NOT LIKE 'f[d-e]%'

ORDER BY Name, User_Name0

I am able to get very similar results in WQL as follows with a limiting DEVICE collection as follows:

select UMR.ResourceId, UMR.UniqueUserName
from SMS_R_System AS SR
inner join SMS_UserMachineRelationship AS UMR on
UMR.ResourceID = SR.ResourceId 
where
UMR.Types = 1 AND 
SR.LastLogonUserName IS NOT NULL.

However this is WQL cannot be used in a USER COLLECTION.  Is there a way to create a USER COLLECTION to get what I want?

George


Viewing all articles
Browse latest Browse all 4762

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>