From 2d453ef608816288d4489c572fef367fbf8a6102 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 11 Jun 2020 16:34:04 -0400 Subject: [PATCH] Put params in correct order --- .../Public/Connect-ZertoServer.ps1 | 20 +++++++++++-------- docs/Connect-ZertoServer.md | 4 ++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ZertoApiWrapper/Public/Connect-ZertoServer.ps1 b/ZertoApiWrapper/Public/Connect-ZertoServer.ps1 index 20c0a7b..49ec0f6 100644 --- a/ZertoApiWrapper/Public/Connect-ZertoServer.ps1 +++ b/ZertoApiWrapper/Public/Connect-ZertoServer.ps1 @@ -11,6 +11,12 @@ function Connect-ZertoServer { [ValidateNotNullOrEmpty()] [Alias("server", "zvm")] [string]$zertoServer, + [Parameter( + Mandatory, + HelpMessage = "Valid credentials to connect to the Zerto Management Server", + Position = 1 + )] + [System.Management.Automation.PSCredential]$credential, [Parameter( HelpMessage = "Zerto Virtual Manager management port. Default value is 9669." )] @@ -18,17 +24,15 @@ function Connect-ZertoServer { [ValidateRange(1024, 65535)] [Alias("port")] [string]$zertoPort = "9669", - [Parameter( - Mandatory, - HelpMessage = "Valid credentials to connect to the Zerto Management Server", - Position = 1 - )] - [System.Management.Automation.PSCredential]$credential, - [switch]$returnHeaders, [Parameter( HelpMessage = "Use this switch to indicate that you would like the module to take care of auto re-authorization and reconnection to the ZVM should the token expire. This option will cache your PSCredential object to be reused" )] - [switch]$AutoReconnect + [switch]$AutoReconnect, + [Parameter( + HelpMessage = "Use this switch to return the headers to a specified variable or to the default output." + )] + [switch]$returnHeaders + ) begin { diff --git a/docs/Connect-ZertoServer.md b/docs/Connect-ZertoServer.md index e1bb8fd..9a08e8d 100644 --- a/docs/Connect-ZertoServer.md +++ b/docs/Connect-ZertoServer.md @@ -13,8 +13,8 @@ Establishes a connection to a ZVM. ## SYNTAX ``` -Connect-ZertoServer [-zertoServer] [-credential] [-zertoPort ] [-returnHeaders] -[] +Connect-ZertoServer [-zertoServer] [-credential] [-zertoPort ] [-AutoReconnect] + [-returnHeaders] [] ``` ## DESCRIPTION