Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Determine  if  a  User  is  a  Local  Administrator  

 Content of Determine if a User is a Local Administrator.js
MD5 Hash: DE731351AC26E259E199D46585C3D686
var objnetwork = new ActiveXObject("WScript.network");
strcomputer = objnetwork.computername;
struser = objnetwork.username;

var objgroup = GetObject("WinNT://" + strcomputer + "/administrators");
var myJS_Enumerator_1 = new Enumerator(objgroup.members());
for (;!myJS_Enumerator_1.atEnd();myJS_Enumerator_1.moveNext()) {
objuser = myJS_Enumerator_1.item();
if (objuser.name == struser) {
WScript.Echo(struser + " is a local administrator.");
}
}



   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a