Michael_C Posted December 13, 2006 Share Posted December 13, 2006 (edited) Hi, Do any of you have a script that extract users + description from windows 2003 Local users and groups. Edited December 13, 2006 by Michael_C Link to comment Share on other sites More sharing options...
cluberti Posted December 14, 2006 Share Posted December 14, 2006 This might help you (script is about halfway down the page):http://www.planet-source-code.com/vb/scrip...03&lngWId=1Next time, consider posting this question in the Programming section of the forums for a quicker answer. Moving post there. Link to comment Share on other sites More sharing options...
Michael_C Posted December 14, 2006 Author Share Posted December 14, 2006 Iam not that god to vb.i cant get it to work i recive this.C:\Documents and Settings\Administrator\Desktop>cscript top.vbsMicrosoft ® Windows Script Host Version 5.6Copyright © Microsoft Corporation 1996-2001. All rights reserved.C:\Documents and Settings\Administrator\Desktop\top.vbs(1, 9) Microsoft VBScript compilation error: Expected identifier???? Link to comment Share on other sites More sharing options...
Michael_C Posted December 15, 2006 Author Share Posted December 15, 2006 I have found this at it workOn Error Resume NextstrComputer = "."Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")Set colItems = objWMIService.ExecQuery _ ("Select * from Win32_UserAccount Where LocalAccount = True")For Each objItem in colItems Wscript.Echo "Account Type: " & objItem.AccountType Wscript.Echo "Caption: " & objItem.Caption Wscript.Echo "Description: " & objItem.Description Wscript.Echo "Disabled: " & objItem.Disabled Wscript.Echo "Domain: " & objItem.Domain Wscript.Echo "Full Name: " & objItem.FullName Wscript.Echo "Local Account: " & objItem.LocalAccount Wscript.Echo "Lockout: " & objItem.Lockout Wscript.Echo "Name: " & objItem.Name Wscript.Echo "Password Changeable: " & objItem.PasswordChangeable Wscript.Echo "Password Expires: " & objItem.PasswordExpires Wscript.Echo "Password Required: " & objItem.PasswordRequired Wscript.Echo "SID: " & objItem.SID Wscript.Echo "SID Type: " & objItem.SIDType Wscript.Echo "Status: " & objItem.Status Wscript.EchoNext Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now