Advertisement
Guest User

Untitled

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