Jump to content

extract users


Recommended Posts


Iam not that god to vb.

i cant get it to work i recive this.

C:\Documents and Settings\Administrator\Desktop>cscript top.vbs

Microsoft ® Windows Script Host Version 5.6

Copyright © 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

I have found this at it work

On Error Resume Next

strComputer = "."

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.Echo

Next

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...