Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 231440

Re: Param Validate Script error

$
0
0

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


Viewing all articles
Browse latest Browse all 231440

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>