![]() Loading |
| VBScript |
| JavaScript |
| Powershell |
Search Options: Get a List of All the Users Who Have a Process Open on a Computer
|
||
|
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colProcessList = objWMIService.ExecQuery("Select * from Win32_Process") Set objDictionary = CreateObject("Scripting.Dictionary") For Each objProcess in colProcessList objProcess.GetOwner strNameOfUser, strUserDomain strOwner = strUserDomain & "\" & strNameOfUser If Not objDictionary.Exists(strOwner) Then objDictionary.Add strOwner, strOwner End If Next For Each strKey in objDictionary.Keys Wscript.Echo strKey Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: | ||