Add Validation for targetHost

This commit is contained in:
Wes Carroll
2019-03-29 17:50:16 -04:00
parent 99cbe96705
commit 11a3395bdb
+2 -1
View File
@@ -6,6 +6,7 @@ function Add-ZertoPeerSite {
Mandatory = $true,
HelpMessage = "Target Hostname or IP address to pair the localsite to."
)]
[ValidateScript( {$_ -match [IPAddress]$_ } )]
[string]$targetHost,
[Parameter(
HelpMessage = "Target communication port. Default is 9081"
@@ -27,4 +28,4 @@ function Add-ZertoPeerSite {
end {
# Nothing to do
}
}
}