Hi,
thank you for your fast answer, but if I insert your code, I get an error.

unknown command [ADSystemInfo]!

Over that error message signed:

Function fnInGroupAD($sGroup,Optional $bComputer)
Dim $objSys,$objTarget,$aMemberOf,$sMemberOf
$objSys = CreateObject("ADSystemInfo")
$objTarget = GetObject(

If I insert the other code, I get this error message:
unknown command [ADSystemInfo]!

Function GetUserOU()
Redim $TempArray[0]
Redim $GetUserOU
$adSys = CreateObject(

What´s wrong? I hope you can help me.

thank´s and see you

michael