Add parameter validation

This commit is contained in:
Wes Carroll
2019-06-10 09:54:07 -04:00
parent 2ed0169a00
commit a0cc4214ca
2 changed files with 6 additions and 0 deletions
@@ -6,14 +6,17 @@ function Get-ZANetworkVpgStat {
HelpMessage = "The VPG identifier.",
Mandatory
)]
[ValidateNotNullOrEmpty()]
[string]$vpgIdentifier,
[Parameter(
HelpMessage = "Start date in RFC 3339 standard ('1970-01-01T00:00:00Z'). If the start date is omitted, the default start date is 7 days before the end date."
)]
[ValidateNotNullOrEmpty()]
[string]$startDate,
[Parameter(
HelpMessage = "End date in RFC 3339 standard ('1970-01-01T00:00:00Z'). If the end date is omitted, the default end date is the current time."
)]
[ValidateNotNullOrEmpty()]
[string]$endDate
)
@@ -6,14 +6,17 @@ function Get-ZANetworkVpgSummary {
HelpMessage = "The VPG identifier.",
Mandatory
)]
[ValidateNotNullOrEmpty()]
[string]$vpgIdentifier,
[Parameter(
HelpMessage = "Start date in RFC 3339 standard ('1970-01-01T00:00:00Z'). If the start date is omitted, the default start date is 7 days before the end date."
)]
[ValidateNotNullOrEmpty()]
[string]$startDate,
[Parameter(
HelpMessage = "End date in RFC 3339 standard ('1970-01-01T00:00:00Z'). If the end date is omitted, the default end date is the current time."
)]
[ValidateNotNullOrEmpty()]
[string]$endDate
)