cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 9

script to pull the user or users logged into a windows VM

Does anyone have a SAM script that would extract the users logged into a windows VM.

0 Kudos
1 Reply
Level 14

Here's three lines to get you started:

$users = (gcim Win32_LoggedONUser).Antecedent.Name

Write-Host "Statistic.users: $($users.count)"

Write-Host "Message.users: Logged on users are: $users"

 

0 Kudos