Workstations that have had more than 5 console users in the last 6 months (finding shared workstations for O365 deployment)

select s.ResourceID, s.Full_Domain_Name0, s.Name0, s.Operating_System_Name_and0, count (*) as NumberofUsers from v_GS_SYSTEM_CONSOLE_USER scu
inner join v_R_System s on s.ResourceID = scu.ResourceID
where scu.LastConsoleUse0 > DATEADD (dd, -180, getdate ()) and s.Operating_System_Name_and0 like 'microsoft windows nt workstation%'
group by s.ResourceID, s.Full_Domain_Name0, s.Name0, s.operating_system_name_and0
having count (*) > 5
order by s.Full_Domain_Name0, s.Name0

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s