Does anyone have a SAM script that would extract the users logged into a windows VM.
Here's three lines to get you started:
$users = (gcim Win32_LoggedONUser).Antecedent.NameWrite-Host "Statistic.users: $($users.count)"Write-Host "Message.users: Logged on users are: $users"