if its the local machine
Set User = GetObject("WinNT://" & strComputer & "/" & strUserName & ",user")
Set Group = GetObject("WinNT://" & strComputer & "/Administrators,group")
Msgbox Group.IsMember(User.ADsPath)
it be faster to just get the User object and iterate through the groups
Set User = GetObject("WinNT://" & strComputer & "/" & strUserName & ",user")
For Each aGroup In User.Groups
If LCase(aGroup.Name) = "administrators" Then
Msgbox "yes they are"
End If
Next
or, it might be quicker to just use the group
Set Group = GetObject("WinNT://" & strComputer & "/Administrators,group")
For Each aMember In Group.Members
If aMember.Name = strUserName Then
Msgbox "they are"
End If
Next
all depends on your taste and if you prefer to only bind to one object, but i think i stretch the point