Check if the Group exist
prüfe ob die Gruppe in der Domäne schon existiert.:
- checkIfGroupExist.vbs
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Test if GroupName already exists
DIM domain,group
domain = "MYNTDOM"
group = "MYNTGROUP"
TestGroup domain,group
'------------------------------------------------------------------------------'
Sub TestGroup(domain,group)
On Error Resume Next
Set GroupExist = GetObject("WinNT://" & domain & "/" & group & ",group")
If Err.Number <> 0 Then Wscript.Echo "Gruppe " & group & " existiert nicht"
If Err.Number = 0 Then Wscript.Echo "Gruppe " & group & " existiert"
Err.Clear
End Sub
'------------------------------------------------------------------------------'