Users running Visual Studio 2015 / 2017 – per-user summary
The same detection as the per-device query, rolled up per user: which devices each person uses old Visual Studio on, how often, and when they last did. Gives you the contact list for a migration or removal campaign.
let Lookback = 30d;
DeviceProcessEvents
| where Timestamp > ago(Lookback)
| where FileName =~ "devenv.exe"
| extend VSVersion = case(
ProcessVersionInfoProductVersion startswith "14." or FolderPath contains "Microsoft Visual Studio 14.0", "VS2015",
ProcessVersionInfoProductVersion startswith "15." or FolderPath contains @"Microsoft Visual Studio\2017", "VS2017",
"")
| where isnotempty(VSVersion)
| summarize Devices = make_set(DeviceName, 20), DeviceCount = dcount(DeviceId),
VSVersions = make_set(VSVersion), Runs = count(), LastRun = max(Timestamp)
by AccountName = tolower(AccountName), AccountUpn = tolower(AccountUpn)
| order by AccountName asc
