Add helpmessages for each switch

This commit is contained in:
Wes Carroll
2020-08-25 13:25:22 -04:00
parent ca45adcd5d
commit 794f87dbf8
@@ -4,82 +4,90 @@ function Get-ZertoAzureResource {
param ( param (
[Parameter( [Parameter(
Mandatory, Mandatory,
HelpMessage = "Name the Azure Site you wish to get the Security Groups.", HelpMessage = "Name the Azure Site you wish to get the information.",
ParameterSetName = "SiteNameSecurityGroup" ParameterSetName = "SiteNameSecurityGroup"
)] )]
[Parameter( [Parameter(
Mandatory, Mandatory,
HelpMessage = "Name the Azure Site you wish to get the Security Groups.", HelpMessage = "Name the Azure Site you wish to get the information.",
ParameterSetName = "SiteNameSubnet" ParameterSetName = "SiteNameSubnet"
)] )]
[Parameter( [Parameter(
Mandatory, Mandatory,
HelpMessage = "Name the Azure Site you wish to get the Security Groups.", HelpMessage = "Name the Azure Site you wish to get the information.",
ParameterSetName = "SiteNameNetwork" ParameterSetName = "SiteNameNetwork"
)] )]
[Parameter( [Parameter(
Mandatory, Mandatory,
HelpMessage = "Name the Azure Site you wish to get the Security Groups.", HelpMessage = "Name the Azure Site you wish to get the information.",
ParameterSetName = "SiteNameVmInstanceType" ParameterSetName = "SiteNameVmInstanceType"
)] )]
[ValidateNotNullOrEmpty()] [ValidateNotNullOrEmpty()]
[String]$SiteName, [String]$SiteName,
[Parameter( [Parameter(
Mandatory, Mandatory,
HelpMessage = "Site Identifier of the Azure Site you wish to get the Security Groups.", HelpMessage = "Site Identifier of the Azure Site you wish to get the information.",
ParameterSetName = "SiteIdentifierSecurityGroup" ParameterSetName = "SiteIdentifierSecurityGroup"
)] )]
[Parameter( [Parameter(
Mandatory, Mandatory,
HelpMessage = "Site Identifier of the Azure Site you wish to get the Security Groups.", HelpMessage = "Site Identifier of the Azure Site you wish to get the information.",
ParameterSetName = "SiteIdentifierSubnet" ParameterSetName = "SiteIdentifierSubnet"
)] )]
[Parameter( [Parameter(
Mandatory, Mandatory,
HelpMessage = "Site Identifier of the Azure Site you wish to get the Security Groups.", HelpMessage = "Site Identifier of the Azure Site you wish to get the information.",
ParameterSetName = "SiteIdentifierNetwork" ParameterSetName = "SiteIdentifierNetwork"
)] )]
[Parameter( [Parameter(
Mandatory, Mandatory,
HelpMessage = "Site Identifier of the Azure Site you wish to get the Security Groups.", HelpMessage = "Site Identifier of the Azure Site you wish to get the information.",
ParameterSetName = "SiteIdentifierVmInstanceType" ParameterSetName = "SiteIdentifierVmInstanceType"
)] )]
[ValidateNotNullOrEmpty()] [ValidateNotNullOrEmpty()]
[String]$SiteIdentifier, [String]$SiteIdentifier,
[Parameter( [Parameter(
Mandatory, Mandatory,
ParameterSetName = "SiteIdentifierSecurityGroup" ParameterSetName = "SiteIdentifierSecurityGroup",
HelpMessage = "Use this switch to get information about the supported Security Groups"
)] )]
[Parameter( [Parameter(
Mandatory, Mandatory,
ParameterSetName = "SiteNameSecurityGroup" ParameterSetName = "SiteNameSecurityGroup",
HelpMessage = "Use this switch to get information about the supported Security Groups"
)] )]
[Switch]$SecurityGroup, [Switch]$SecurityGroup,
[Parameter( [Parameter(
Mandatory, Mandatory,
ParameterSetName = "SiteIdentifierSubnet" ParameterSetName = "SiteIdentifierSubnet",
HelpMessage = "Use this switch to get information about the supported Subnets"
)] )]
[Parameter( [Parameter(
Mandatory, Mandatory,
ParameterSetName = "SiteNameSubnet" ParameterSetName = "SiteNameSubnet",
HelpMessage = "Use this switch to get information about the supported Subnets"
)] )]
[Switch]$Subnet, [Switch]$Subnet,
[Parameter( [Parameter(
Mandatory, Mandatory,
ParameterSetName = "SiteIdentifierNetwork" ParameterSetName = "SiteIdentifierNetwork",
HelpMessage = "Use this switch to get information about the supported Networks (VNets)."
)] )]
[Parameter( [Parameter(
Mandatory, Mandatory,
ParameterSetName = "SiteNameNetwork" ParameterSetName = "SiteNameNetwork",
HelpMessage = "Use this switch to get information about the supported Networks (VNets)."
)] )]
[Switch]$Network, [Switch]$Network,
[Parameter( [Parameter(
Mandatory, Mandatory,
ParameterSetName = "SiteIdentifierVmInstanceType" ParameterSetName = "SiteIdentifierVmInstanceType",
HelpMessage = "Use this switch to get information about the supported Vm Instance Types."
)] )]
[Parameter( [Parameter(
Mandatory, Mandatory,
ParameterSetName = "SiteNameVmInstanceType" ParameterSetName = "SiteNameVmInstanceType",
HelpMessage = "Use this switch to get information about the supported Vm Instance Types."
)] )]
[Switch]$VmInstanceType [Switch]$VmInstanceType
) )