Get lastLogon attribute of Computer object, need guru help plz
i manage the users's account , easy lastlogin information, clean unused of them.
to resume situation, i try get, via powershell script, lastlogon attribute of each computer in ad.
i use powershell script on vista sp1 os , and query w2k server ad.
$ldapquery = "(&(objectcategory=computer)(operatingsystem=windows 2000 professional))" $de = new-object system.directoryservices.directoryentryanyway, 1 don't giving me informations need
$ads.pagesize = 3000
$ads = new-object system.directoryservices.directorysearcher -argumentlist $de,$ldapquery
$complist = $ads.findall()
$complist | export-csv -path 9mold_computers.csv
i need make csv file computer name , lastlogon (attribute of object) convert, myself, large interger date format.
i need help, in language vb, auto it, powershell or else.
if need more information me, ask me.
regards.
rikho.
hi rikho,
thanks posting here.
powershell or vbscript achieve goal. please check following sample script find computers last logged on before specified date. however, may need customize meet environment’s requirement.
search computers last logged on before specified date
http://gallery.technet.microsoft.com/scriptcenter/en-us/6c57aaf7-bbdb-4018-a54a-b9fd2b7e1abb
if have difficulties when customizing scripts, suggest initial new post in official scripting guys forum! further support there. best resource scripting related problems.
for convenience, have list link followed.
the official scripting guys forum
http://social.microsoft.com/forums/en-us/itcg/thread/34ed6cba-7698-4aa8-b13c-8693081296ef
this posting provided "as is" no warranties, , confers no rights.
Windows Server > Directory Services
Comments
Post a Comment