Display current logged on users(Win 2k Adv. Serv)

H

HELP

How can I find the users that are currently logged on to
my server (Win 2k Adv. Serv)without using the auditing
option in Group policy. There is a snap-in in computer
management that allows you to view the current shares
that are being used by what user, so why can't I do the
same thing with users who are logged on to the domain but
not connected to shares?
 
D

DJ

Hi,

A simple VBS script can do that for you. Just use this:

ComputerName = "YOUR W2K AD SERVER NAME HERE"
who = "winmgmts:{impersonationLevel=impersonate}!//"&
ComputerName &""
Set Users = GetObject( who ).InstancesOf
("Win32_ComputerSystem")
for each User in Users
MsgBox "Logged On User: " & User.UserName
Next

just copy this into a blank notepad document and save it
with a .vbs extension. That will do the trick.

HTH

D.J.
A+, Net +, MCP, MCSA
Northrop Grumman IT
 
G

Guest

I tried this script and it only shows me who is logged
into that computer at that time. Did I miss something.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top