Post by Stefan WuebbeYou can perhaps get it via WMI, try to google for "scriptomatic" and related.
I did some exploring a while back, and the following code exposes all the user
properties I could find, but I believe there are more. If you can add to my
list, please do, may be we can document more.
strDomain = "DOMAIN"
Public PrimDomainContr
Create cursor ADnames (username c(30),fullname c(80),descript c(80),Class
c(50),accdisable l,;
acclocked l,profile c(30),loginscrpt c(50),Homedir c(30))
PrimDomainContr = Getobject("WinNT://" + strDomain)
SET STEP on
For Each User In PrimDomainContr
If User.Class = 'User'
Insert Into ADnames
(username,fullname,descript,Class,accdisable,acclocked,profile,;
loginscrpt,Homedir) Values
(User.Name,user.fullname,User.description,User.Class,User.AccountDisabled,;
User.IsAccountLocked,User.Profile,User.loginscript,User.Homedirectory)
Endif
Next
Browse Norm
Rick
hth
-Stefan
Post by WPThanks Rick, this is nice for getting the properties of the users of the
domain, but I would like to see if the user has logged on to the server, so
I would like to get back something similar to "net session". I have to keep
track of the number of users logged on at any moment, and record it every 15
minutes.
Walter
Post by Olaf DoschkeThe User object created by the script may also have
LastLogin and LastLogOff properties.
If LastLogIn>LastLagoff the user will be logged in.
But if you have not only one DC, that's not giving you
the real last login/off.
See here for examples and the pros and cons. If you
are in a large network, you may need to query many
domain controllers to really get the lastlogon.
http://boards.cramsession.com/boards/vbms.asp?d=744261&pvm=False
http://www.rlmueller.net/Last%20Logon.htm
What's valid for the lastlogon should also be valid for the
lastlogoff.
Bye, Olaf.
Post by WPThe problem is: the lastlogoff field is always zero, so it is not useful.
Submitted via EggHeadCafe
Excel Generate High Quality RoadMaps
http://www.eggheadcafe.com/tutorials/aspnet/3310004f-e1ae-45a7-9bea-7b2b970d1230/excel-generate-high-quality-roadmaps.aspx