Hey Guys,
I am trying to auto move the DBs using the RedistributeActiveDatabasesScript from one of the Exchange Management Server and everytime I run the script it says the below error and cannot convert the value of the DAGName. This is weird and I cannot figure out whats wrong. I am 100% sure the DAG names are correct and theats what listed under ECP too and upon doing the get-databaseavailabilitygroup i get the same DAG Name too.
PS] D:\Exchange Server\v15\Scripts>.\RedistributeActiveDatabases.ps1 -DagName DAG01 -BalanceDbsByActivationPreference annot convert value "DAG01" to type Microsoft.Exchange.Data.Directory.SystemConfiguration.DatabaseAvailabilityGroup". Error: "Cannot convert the DAG01" value of type "Deserialized.Microsoft.Exchange.Data.Directory.SystemConfiguration.DatabaseAvailabilityGroup" o type "Microsoft.Exchange.Data.Directory.SystemConfiguration.DatabaseAvailabilityGroup"." t D:\Exchange Server\v15\Scripts\RedistributeActiveDatabases.ps1:2801 char:3 $script:dag = Get-DatabaseAvailabilityGroup $DagName -Status ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo : MetadataError: (:) [], ArgumentTransformationMetadataException+ FullyQualifiedErrorId : RuntimeException Log-Error : [02:40:33.145 UTC] Could not find DAG matching 'DAG01'! t D:\Exchange Server\v15\Scripts\RedistributeActiveDatabases.ps1:2806 char:3 Log-Error ($RedistributeActiveDatabases_LocalizedStrings.res_0089 -f $DagName) ... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Log-Error
Can anyone asssit what can be the problem
When i run theGet-DatabaseAvailabilityGroup I see Correct DAG Names. I have removed the Server names here for example
[PS] D:\Exchange Server\v15\Scripts>Get-DatabaseAvailabilityGroup Name Member Servers Operational Servers ---- -------------- ------------------- DAG01 DAG02 DAG03 DAG04
Please assist and Thanks in Advance