Using script snippit below I need a way to determine if the grp parameter is a user or a group.
Does anyone have a suggestion?
Thanks
Sub EnumGroupMembers(server,grp)
Dim Group
Dim Member
On Error Resume Next
'Bind to a group object.
Set Group = GetObject("WinNT://"+server+"/"+grp)
If Err <> 0 Then call check_error("Error in getting group members"):On Error goto 0 :Exit Sub
'Enumerate the members in group.
For Each Member in Group.Members
wsh.echo Left(server+Space(20),20)+Space(6)+Left(grp&Space(15),15)&Space(11)&Member.Name
UserClassPermDeleteListFile.WriteLine Left(server+Space(20),20)+Space(6)+Left(grp&Space(15),15)&Space(11)&Member.Name
Next
End Sub
Does anyone have a suggestion?
Thanks
Sub EnumGroupMembers(server,grp)
Dim Group
Dim Member
On Error Resume Next
'Bind to a group object.
Set Group = GetObject("WinNT://"+server+"/"+grp)
If Err <> 0 Then call check_error("Error in getting group members"):On Error goto 0 :Exit Sub
'Enumerate the members in group.
For Each Member in Group.Members
wsh.echo Left(server+Space(20),20)+Space(6)+Left(grp&Space(15),15)&Space(11)&Member.Name
UserClassPermDeleteListFile.WriteLine Left(server+Space(20),20)+Space(6)+Left(grp&Space(15),15)&Space(11)&Member.Name
Next
End Sub