Tuesday, July 20, 2010

VBS Find Who is Logged onto a Remote Machine

This script references the local PC or remote PC and finds the user currently logged on. See below:


ComputerName = InputBox("Enter the name of the computer you wish to query")
who = "winmgmts:{impersonationLevel=impersonate}!//"& ComputerName &""
Set Users = GetObject( who ).InstancesOf ("Win32_ComputerSystem")
for each User in Users
MsgBox "The user name for the specified computer is: " & User.UserName
Next

No comments:

Post a Comment

Generating "Always On Top" NSWindow in macOS across all detected displays

Also: Using UIKit & Cocoa Frameworks using Objective-C In m acOS or OS X , written in either Objective-C or Swift  Langues, you m...