I am attempting to create a USER collection identifying our CITRIX users.
This collection would then be used to manage what application packages are
displayed within the Application Catalog.  The catch is that we don't know
the complete list of CITRIX users.

To this end the thinking is, as we know the PCs that are at sites deemed to
be CITRIX, we could use USER DEVICE AFFINITY to identify users of these PCs
and build a USER collection from the results.

SQL seems to provide exactly what we are looking for.

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

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.

select SR.ResourceId, SR.Name, SR.LastLogonUserName, SR.IPAddresses,
SR.Client
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.


How can I take this WQL and create a USER COLLECTION based on the
LastLogonUserName field?


George


Reply via email to