So, you have a group of users, but you can’t advertise your Task Sequence to users. If you enable Asset Intelligence to inventory the TopConsoleUser for a machine, you can extract all machines based on the TopConsoleUser for that group.
select distinct SMS_R_System.Name from SMS_R_System inner join SMS_G_System_SYSTEM_CONSOLE_USAGE on SMS_G_System_SYSTEM_CONSOLE_USAGE.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SYSTEM_CONSOLE_USAGE.TopConsoleUser in (select distinct UniqueUserName from SMS_R_User where UserGroupName = ‘domainGroup’)
This will display all machine objects for users in group for domain. Now you can simply make a Collection based on this query and you can target your Task Sequence to these machines.
Hello, I have used your script above so thank you very much for making it public. I have a question though, the query only returns results for Windows 7 OS’s and not XP SP3 OS’s, would you have any idea why this would be the case? thank you
The only thing I can think of at the top of my head is if you have some Group Policy that is specific for XP machines, and that this policy has disabled the auditing of logged on and logged off users.
I’m not sure if this is enabled by default for Windows 7, but I have experienced that it needs to be set specifically for Windows XP. You can read about the policy here.
thats great Frode and thanks so much for replying so quickly, I’m scratching my head about this one. I will have a look into this and post back results in case someone else has a similiar problem. cheers
Hello Frode, I have enabled success/failure auditing in a GPO for account logon and logon events as this was disabled. I will give this a day or 2 to replicate and hopefully then will I be able to pick up XP SP3 OS’s.
That worked for me Frode thanks so much for recommending that. So, auditing of Logon and Account Logon events needs to be enabled for on your domain for sccm to pick up XP SP3 OSs.
Superb. I’m glad you got it working 🙂