Advertisement
Guest User

Untitled

a guest
Jun 28th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Dim strComputerName
  2. Dim strPassword
  3.  
  4. strComputerName = WScript.CreateObject("WScript.Network").ComputerName
  5. strPassword = ""
  6.  
  7. Set LocalAccounts = GetObject("WinNT://" & strComputerName)
  8. LocalAccounts.Filter = Array("user")
  9.  
  10. For Each objUser In LocalAccounts
  11.    if objUser.AccountDisabled = TRUE then
  12.     WScript.Echo "Account for " & objUser.Get("cn") & " currently Enalbed"
  13.     end if
  14. Next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement