Hello Guys,
I had requirement to create multiple groups in domain. I thought it was pretty straight forward so just used my old Script to do the job for me.
My script input file named: groups.txt ( Where you see the group name as space in it )

My Old Scripts contains following "DSADD" code with "FOR" loop

When I executed the script I got the following error popped out in the CLI window.
If you notice that the error was due to the space in the group name. The for loop script by default took the space delimited and try to create the Group named: "TestingGroupName" but it would have got succeeded first time if "TestingGroupName" does not exist. Second time onwards it will throw the below error that already a group exist.

So, I have to manually specify the delimiter by comma instead of space in the script
New Script with delimiter by comma:

Now with the new script, I am able to create the group name with space in it.

Hope, this might help you as well..
I had requirement to create multiple groups in domain. I thought it was pretty straight forward so just used my old Script to do the job for me.
My script input file named: groups.txt ( Where you see the group name as space in it )
My Old Scripts contains following "DSADD" code with "FOR" loop
When I executed the script I got the following error popped out in the CLI window.
If you notice that the error was due to the space in the group name. The for loop script by default took the space delimited and try to create the Group named: "TestingGroupName" but it would have got succeeded first time if "TestingGroupName" does not exist. Second time onwards it will throw the below error that already a group exist.
So, I have to manually specify the delimiter by comma instead of space in the script
New Script with delimiter by comma:
Now with the new script, I am able to create the group name with space in it.
Hope, this might help you as well..
No comments:
Post a Comment