Index error occurs when executing "Test-RDOU Access" command
<Question>
When executing the cmdlet "Test-RDOU Access", the following message occurred and the command terminated abnormally.
Please tell me the reason why the follow error message is output and how to prevent abnormal termination.
<Error Message>
System.Management.Automation.RemoteException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list
<Supplement>
We use Test-RDOUAccess to check if you have permission to access the OU.
If there is no permission, a script that grants access is created and executed.
We expect a True or False return.
- Error occured command:
Test-RDOUAccess -ConnectionBroker xxxx.aaa.bbb.co.jp -OU "OU=XXX,OU=XXX,OU=XXX,OU=Computers,OU=XXX,DC=xxx,DC=xxx,DC=xxx,DC=xxx"
→ Error - Success command:
Test-RDOUAccess -ConnectionBroker xxxx.aaa.bbb.co.jp -OU "OU=XXX,OU=XXX,OU=Computers,OU=XXX,DC=xxx,DC=xxx,DC=xxx,DC=xxx"
→ return OK
The difference between a success command and a failure command is only one less OU hierarchy.