Add Validation for targetHost
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user