Get a list of all System Center Virtual Machine Manager (SCVMM 2012 R2) Users via SQL

Ever need to send a notice to your System Center Virtual Machine Manager (SCVMM) users like “Upgrade to UR7 coming” but realized you never took the time to collect all of their names?

Here is some quick SQL that will give you the names of anyone who has actually used the platform:

select
distinct replace(SessionOwner, ‘contoso\’,”) as Username
from [tbl_TR_TaskTrail]
order by 1

As a added bonus if you replace contoso with your domain name it will strip that out making it ready to past into outlook for name resolution.

Enjoy!

-Eric

Leave a Reply

Your email address will not be published. Required fields are marked *