question

morinoyokan avatar image
0 Votes"
morinoyokan asked IanXue-MSFT commented

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.

windows-server-powershell
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

What if you specify other OUs? Do you see the same error message?

0 Votes 0 ·

0 Answers