Hi Lucd,
Thank you for your response, sadly the test with a valid datacenter did not work:
PS> Test-Validation -DCChoice WVHQ
Test-Validation : Cannot validate argument on parameter 'DCChoice'. The "
try{
Get-DataCenter -Name $_ -ErrorAction Stop | out-null
}
catch{
throw "Datacenter $_ not found. Please enter a valid Datacenter Name."
}
" validation script for the argument with value "WVHQ" did not return a result of True. Determine why the validation script failed, and then try the command again.
At line:1 char:27
+ Test-Validation -DCChoice WVHQ
+ ~~~~
+ CategoryInfo : InvalidData: (:) [Test-Validation], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Test-Validation
Thoughts?
Thank you for your help
Norm