Advertisement
Guest User

Untitled

a guest
Oct 8th, 2017
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. dim strUser  : strUser = CreateObject("Wscript.Network").UserName
  2. dim blnFound : blnFound = false
  3.  
  4. for each objUser in GetObject("WinNT://./Administrators").Members
  5.     if objUser.Name = strUser then
  6.         Echo strUser & " is a member of local administrators."
  7.         blnFound = true
  8.     end If
  9. next
  10.  
  11. if blnFound = false then
  12.   Echo strUser & " is not a member of local administrators"
  13. end if
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement