tjcarst, I have reproduced you error in my AD environment. I have tested quite a bit and could not find a reason for the behavior.
What I found is that, always on the second creation of a group, the SetInfo method failed with error 9 (The storage control block address is invalid). It did not matter in which order the groups were created. That ruled out any name issues.
quote:
c:\data\scripts>C:\Data\Kix2001\KiX2001.421\kix32 test.kix
GetObject= 0
Error.create=0
Error.put=0
Error.GrpType=0
Error.Descr=0
Error.Setinfo=0
Group A_mrh_01_q-123hall successfully created
GetObject= 0
Error.create=0
Error.put=0
Error.GrpType=0
Error.Descr=0
Error.Setinfo=9
Error=9
CreateAdGroup D_mrh_01_q-123hall Failed with Error: 9
This led me to believe that KiXtart or ADSI is not properly destroying the OU or group object and the Setinfo is trying to recreate the previous group. I added $oOU=0 and $oNewGrp=0 before the end of the UDF to force the issue, but this did not help.
In short the UDF seem to work only once per script execution. This has me very concerned. Can anyone offer any other testing scenarios or theories on what may be happening here?
[ 23. October 2003, 04:51: Message edited by: Howard Bullock ]