11 June, 2014

Get windows process's username in powershell

use:
(get-wmiobject win32_process | where{$_.name -eq "vpnui.exe"}).GetOwner().user

No comments:

Post a Comment