strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colAccounts = objWMIService.ExecQuery ("Select * From Win32_UserAccount Where LocalAccount = TRUE") For Each objAccount in colAccounts If Left (objAccount.SID, 6) = "S-1-5-" and Right(objAccount.SID, 4) = "-500" Then Wscript.Echo objAccount.Name End If Next