"Error (objSWbemServices) : " & Err.Number & "
" & Err.Description
WScript.Quit
End If
Err.Clear
Set file_object = CreateObject("Scripting.FileSystemObject")
Set list = file_object.OpenTextFile("./Rezult.log",ForWriting,True)
Set colAcc = objSWbemServices.ExecQuery ("Select * from Win32_UserAccount")
WScript.Echo "Обнаружено " & colAcc.Count & " учетных записей."
For Each ttt in colAcc
list.Write ttt.Caption & " " & vbCrLf
list.Write " " & "Caption : " & ttt.Caption & vbCrLf
list.Write " " & "Name : " & ttt.Name & vbCrLf
list.Write " " & "Description : " & ttt.Description & vbCrLf
list.Write " " & "Domain : " & ttt.Domain & vbCrLf
list.Write " " & "SID : " & ttt.SID & vbCrLf
list.Write " " & "SIDType : " & ttt.SIDType & vbCrLf
list.Write " " & "Disabled : " & ttt.Disabled & vbCrLf
list.Write " " & "Lockout : " & ttt.Lockout & vbCrLf
list.Write " " & "PasswordChangeable : " & ttt.PasswordChangeable & vbCrLf
list.Write " " & "PasswordExpires : " & ttt.PasswordExpires & vbCrLf
list.Write " " & "PasswordRequired : " & ttt.PasswordRequired & vbCrLf
list.Write " ------------------------------- " & vbCrLf
Next
list.Close
VBS: Информация об учетных записях пользователей на удаленном компьютере
© Andy_user, http://forum.sysadmins.ru/viewtopic.php?t=79925&start=0