From 1a5f2b09f64f2acf3a7d089c165732543e497491 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 4 Apr 2019 08:38:56 -0400 Subject: [PATCH] Add Null and Empty Validators --- ZertoApiWrapper/Public/Install-ZertoVra.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ZertoApiWrapper/Public/Install-ZertoVra.ps1 b/ZertoApiWrapper/Public/Install-ZertoVra.ps1 index 719f6a4..0a66c93 100644 --- a/ZertoApiWrapper/Public/Install-ZertoVra.ps1 +++ b/ZertoApiWrapper/Public/Install-ZertoVra.ps1 @@ -4,10 +4,13 @@ function Install-ZertoVra { [cmdletbinding( SupportsShouldProcess = $true )] param( [Parameter( Mandatory = $true, HelpMessage = "Host name where the VRA is to be installed." )] + [ValidateNotNullOrEmpty()] [string]$hostName, [Parameter( Mandatory = $true, HelpMessage = "Datastore name where the VRA is to be installed." )] + [ValidateNotNullOrEmpty()] [string]$datastoreName, [Parameter( Mandatory = $true, HelpMessage = "Network name the VRA is to be assigned." )] + [ValidateNotNullOrEmpty()] [string]$networkName, [Parameter( HelpMessage = "Initial amount of memory to assign to the VRA in GB. Default is 3, Minimum is 1, Maximum is 16" )] [ValidateRange(1, 16)]