Returns information about the user accounts found on a computer.

This script was tested using Object REXX 2.1.0 for Microsoft Windows, available from IBM.

Object REXX
Edit|Remove
strComputer = "."
objWMIService = .OLEObject~GetObject("winmgmts:\\"||strComputer||"\root\CIMV2")
do objItem over objWMIService~ExecQuery("Select * from Win32_UserAccount")
    say "Account Type:" objItem~AccountType
    say "Caption:" objItem~Caption
    say "Description:" objItem~Description
    say "Disabled:" objItem~Disabled
    say "Domain:" objItem~Domain
    say "Full Name:" objItem~FullName
    say "Install Date:" objItem~InstallDate
    say "Local Account:" objItem~LocalAccount
    say "Lockout:" objItem~Lockout
    say "Name:" objItem~Name
    say "Password Changeable:" objItem~PasswordChangeable
    say "Password Expires:" objItem~PasswordExpires
    say "Password Required:" objItem~PasswordRequired
    say "SID:" objItem~SID
    say "SID Type:" objItem~SIDType
    say "Status:" objItem~Status
end