I'm using this script:
I run it with "cscript c:\myscript.vbs > data.txt"
to output it to a text file
but how can I format the output for comma delimited?
I tried with wscript and it wouldn't accept all the commas
I need it to be:
user.name, user.fullname, user.lockout, etc
ComputerName = InputBox("Enter the name of the computer you wish to query")
winmgmt1 = "winmgmts:{impersonationLevel=impersonate}!//"& ComputerName &""
Set UserSet = GetObject( winmgmt1 ).InstancesOf ("Win32_UserAccount")
for each User in UserSet
WScript.Echo "==============================================="
WScript.Echo "Information for " & User.Name
WScript.Echo "The full username for the specified computer is: " & User.Fullname
WScript.Echo "Account Locked? " & User.Lockout
WScript.Echo "Password can be changed?: " & User.PasswordChangeable
WScript.Echo "Password is expirable: " & User.PasswordExpires
WScript.Echo "==============================================="
Next
I run it with "cscript c:\myscript.vbs > data.txt"
to output it to a text file
but how can I format the output for comma delimited?
I tried with wscript and it wouldn't accept all the commas
I need it to be:
user.name, user.fullname, user.lockout, etc