Doug Deitterick's Blog

Information about Skype for Business, Lync, OCS, and Exchange UM.

Issue when Running New/Set-CsHealthMonitoringConfiguration

Issue when Running New/Set-CsHealthMonitoringConfiguration

  • Comments 1
  • Likes

 I was trying to setup synthetic transactions in my lab today and I ran across an issue when configuring the sAMAccountName in the PowerShell cmdlet.  I created two users, CsHealthMonitoring1 & CsHealthMonitoring2.  Running the following cmdlet: 

New-CsHealthMonitoringConfiguration -Identity -FirstTestSamAccountName LAB\CsHealthMonitoring1 -FirstTestUserSipUri "" -SecondTestSamAccountName LAB\CsHealthMonitoring2 -SecondTestUserSipUri ""

Produced the following error message:

New-CsHealthMonitoringConfiguration : Cannot create item "": "Invalid value for FirstTestSamAccountName. Value must match pattern:[^\\/:\*\?\"<>\|\.][^\\/:\*\?\"<>\|]{0,14}\\[^\\/:\*\?\"<>\|\.][^\\/:\*\?\"<>\|]{0,14}"
At line:1 char:36
+ New-CsHealthMonitoringConfiguration <<<<  -FirstTestSamAccountName LAB\CsHealthMonitoring1 -FirstTestUserSipUri "" -SecondTestSamAccountName LAB\CsHealthMonitoring2 -SecondTestUserSipUri ""
    + CategoryInfo          : InvalidArgument: ( [New-CsHealthMonitoringConfiguration], PropertyArgumentException
    + FullyQualifiedErrorId : InvalidNew,Microsoft.Rtc.Management.Internal.NewHealthMonitoringConfigurationCmdlet

It took me awhile to figure out that the username can only be 15 characters long.  Even though when I created the account the username fit the User logon name (pre-Windows 2000) length (you can enter up to 20 characters), the cmdlet only accepts a user name that 15 characters or less.

Once I shortened the usernames and re-ran the cmdlet, it completed successfully and I could run the synthetic transactions.

  • Bless me! Building our RAP deployment and we ran into this beauty. Thanks!

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment