new-TestCasConnectivityUser.ps1 does not run
Attempting to create the test user so I can diagnose an exchange server 2013 that is part of a two node plus witness DAG. The command errors at first and the help is to use ".\new-TestCasConnectivityUser.ps1" to get it to run. That command produces nothing but a command prompt with no input for password or anything else. Checking under the users folders, there is no test user created. Need some help. Tried using the & in front of the command but that produces nothing but an error stating it i
February 24th, 2015 4:26pm

The one issue I've found with it is that it gets confused if you have multiple OUs named Users wherever they might reside.  Try specifying the OU into which the user is to be created explicitly with the appropriate parameter.

That may not be your problem, however, as this problem results in an error for me.

You do have the source for the script (just open it in Notepad) so you could try executing the commands manually.  I've actually modified that script in the past, you almost have to in order to use it as part of an automated build.

Free Windows Admin Tool Kit Click here and download it now
February 24th, 2015 6:35pm

Hi Ron,

Agree with Ed, I recommend you refer to the following command to specify the OU:

Get-MailboxServer | .\new-TestCasConnectivityUser.ps1 -OU domain.com/users 
Best regards,

February 25th, 2015 4:33am

Thank you for your help. I think you are correct in that the script needs modification. you are correct, the OU in AD is slightly different. Attempted to alter that and run it. Getting errors that frankly I am not sure how to correct as I am not seeing the error in the code. I am not a scripter so this is a struggle. Here is what I am seeing.

Import-LocalizedData : The following error occurred while Windows PowerShell was loading the 'C:\program
files\Microsoft\Exchange Server\V15\Scripts\en\new-TestCasConnectivityUser.strings.psd1' script data file:
At line:2 char:1
+ ConvertFrom-StringData @'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
Executable script code found in signature block.
.
At C:\program files\Microsoft\Exchange Server\V15\Scripts\new-TestCasConnectivityUser.ps1:166 char:1
+ Import-LocalizedData -BindingVariable new_testcasuser_LocalizedStrings -FileName ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Import-LocalizedData], PSInvalidOperationException
    + FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ImportLocalizedData

read-host : name cannot be null or empty.
At C:\program files\Microsoft\Exchange Server\V15\Scripts\new-TestCasConnectivityUser.ps1:238 char:24
+     $securePassword = (read-host -asSecureString $new_testcasuser_LocalizedStrin ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Read-Host], PSArgumentException
    + FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.ReadHostCommand

 EX01.domain.local
read-host : name cannot be null or empty.
At C:\program files\Microsoft\Exchange Server\V15\Scripts\new-TestCasConnectivityUser.ps1:46 char:11
+           read-host $new_testcasuser_LocalizedStrings.res_PromptToQuitOrContinue
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Read-Host], PSArgumentException
    + FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.ReadHostCommand

CreateTestUser : Mailbox could not be created. Verify that OU ( domain.local/users ) exists and that password meets
complexity requirements.
At C:\program files\Microsoft\Exchange Server\V15\Scripts\new-TestCasConnectivityUser.ps1:255 char:13
+   $result = CreateTestUser $exchangeServer $mailboxServer $securePassword $Organ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,CreateTestUser

 EX02.domain.local
read-host : name cannot be null or empty.
At C:\program files\Microsoft\Exchange Server\V15\Scripts\new-TestCasConnectivityUser.ps1:46 char:11
+           read-host $new_testcasuser_LocalizedStrings.res_PromptToQuitOrContinue
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Read-Host], PSArgumentException
    + FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.ReadHostCommand

CreateTestUser : Mailbox could not be created. Verify that OU ( domain.local/users ) exists and that password meets
complexity requirements.
At C:\program files\Microsoft\Exchange Server\V15\Scripts\new-TestCasConnectivityUser.ps1:255 char:13
+   $result = CreateTestUser $exchangeServer $mailboxServer $securePassword $Organ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,CreateTestUser

Not sure if this is too vague. But perhaps I can get a little bit more help with this error. In some ways it seems that Microsoft would have been better off just allowing a test user to be created in the same way as any other user. But what do I know.

Thanks

Free Windows Admin Tool Kit Click here and download it now
February 26th, 2015 2:33pm

Thank you for your response. It appears that you and Ed are both on the right track as the script fails. Take a look at my response to Ed for what happened. Perhaps one of you two can help me fix the script.

Thanks

February 26th, 2015 2:35pm

The errors you're seeing don't appear to be the same as what I've suggested.

Have you tried running the script in the Exchange Management Shell run as Administrator?  And are the files referenced in the error messages present?  You're changing the default directory to C:\Program Files\Microsoft\Exchange Server\V15\Scripts (or wherever you installed Exchange), right?

Free Windows Admin Tool Kit Click here and download it now
February 26th, 2015 4:32pm

Thank you Ed for your response. I have tried running the script from Power Shell with elevated rights. Also , I am running it from the directory where the scripts are located. The result is the same as with using the PS in exchange.
February 27th, 2015 4:04pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics