From eea6e959881ee1ca0d772f4c187f89cabb445c5f Mon Sep 17 00:00:00 2001 From: Brownstein Date: Thu, 27 Aug 2020 15:08:28 -0400 Subject: [PATCH] update test and help files --- Tests/Public/Invoke-ZertoMove.Tests.ps1 | 8 +-- docs/Invoke-ZertoMove.md | 73 +++++++++++++++++++------ 2 files changed, 59 insertions(+), 22 deletions(-) diff --git a/Tests/Public/Invoke-ZertoMove.Tests.ps1 b/Tests/Public/Invoke-ZertoMove.Tests.ps1 index aaca87b..d3b398b 100644 --- a/Tests/Public/Invoke-ZertoMove.Tests.ps1 +++ b/Tests/Public/Invoke-ZertoMove.Tests.ps1 @@ -5,8 +5,8 @@ $global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0] Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { - It "$global:function should have exactly 20 parameters defined" { - (Get-Command $global:function).Parameters.Count | Should -Be 20 + It "$global:function should have exactly 21 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 21 } $ParameterTestCases = @( @@ -14,8 +14,8 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { @{ParameterName = 'commitPolicy'; Type = 'String'; Mandatory = $false; Validation = 'Set' } @{ParameterName = 'commitPolicyTimeout'; Type = 'Int'; Mandatory = $false; Validation = 'Range' } @{ParameterName = 'forceShutdown'; Type = 'Switch'; Mandatory = $false; Validation = $null } - @{ParameterName = 'disableReverseProtection'; Type = 'Switch'; Mandatory = $true; Validation = $null } - @{ParameterName = 'keepSourceVms'; Type = 'Switch'; Mandatory = $true; Validation = $null } + @{ParameterName = 'disableReverseProtection'; Type = 'Switch'; Mandatory = $false; Validation = $null } + @{ParameterName = 'keepSourceVms'; Type = 'Switch'; Mandatory = $false; Validation = $null } @{ParameterName = 'ContinueOnPreScriptFailure'; Type = 'Switch'; Mandatory = $false; Validation = $null } @{ParameterName = 'whatIf'; Type = 'Switch'; Mandatory = $false; Validation = 'ShouldProcess' } ) diff --git a/docs/Invoke-ZertoMove.md b/docs/Invoke-ZertoMove.md index eb1c661..030ba21 100644 --- a/docs/Invoke-ZertoMove.md +++ b/docs/Invoke-ZertoMove.md @@ -12,22 +12,30 @@ Start a move of a VPG. ## SYNTAX -### main (Default) +### id (Default) ``` -Invoke-ZertoMove -vpgName [-commitPolicy ] [-commitPolicyTimeout ] [-forceShutdown] +Invoke-ZertoMove -vpgIdentifier [-forceShutdown] [-disableReverseProtection] [-keepSourceVms] [-ContinueOnPreScriptFailure] [-WhatIf] [-Confirm] [] ``` -### disableReverseProtection +### commitName ``` -Invoke-ZertoMove -vpgName [-commitPolicy ] [-commitPolicyTimeout ] [-forceShutdown] - [-disableReverseProtection] [-ContinueOnPreScriptFailure] [-WhatIf] [-Confirm] [] +Invoke-ZertoMove -vpgName -commitPolicy [-commitPolicyTimeout ] [-forceShutdown] + [-disableReverseProtection] [-keepSourceVms] [-ContinueOnPreScriptFailure] [-WhatIf] [-Confirm] + [] ``` -### keepSourceVms +### name ``` -Invoke-ZertoMove -vpgName [-commitPolicy ] [-commitPolicyTimeout ] [-forceShutdown] - [-keepSourceVms] [-ContinueOnPreScriptFailure] [-WhatIf] [-Confirm] [] +Invoke-ZertoMove -vpgName [-forceShutdown] [-disableReverseProtection] [-keepSourceVms] + [-ContinueOnPreScriptFailure] [-WhatIf] [-Confirm] [] +``` + +### commitId +``` +Invoke-ZertoMove -vpgIdentifier -commitPolicy [-commitPolicyTimeout ] [-forceShutdown] + [-disableReverseProtection] [-keepSourceVms] [-ContinueOnPreScriptFailure] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -37,10 +45,24 @@ Start a move of a VPG. ### Example 1 ```powershell -PS C:\> Invoke-ZertoMove -vpgName "MyVpg" +PS C:\> Invoke-ZertoMove -vpgName 'MyVpg' ``` -Starts a move operation of VPG "MyVpg" +Specify the name of a vpg to move + +### Example 2 +```powershell +PS C:\> Invoke-ZertoMove -vpgIdentifier '2fbbf6b5-cddc-4653-b1fe-564f069eeb64' +``` + +Specify the identifier of a vpg to move + +### Example 3 +```powershell +PS C:\> Get-ZertoVpg | Invoke-ZertoMove +``` + +Utilize the pipeline to move multiple vpgs ## PARAMETERS @@ -55,11 +77,11 @@ Default is the Site Settings setting. ```yaml Type: String -Parameter Sets: (All) +Parameter Sets: commitName, commitId Aliases: Accepted values: Rollback, Commit, None -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -72,7 +94,7 @@ If omitted, the site settings default will be applied. ```yaml Type: Int32 -Parameter Sets: (All) +Parameter Sets: commitName, commitId Aliases: Required: False @@ -102,10 +124,10 @@ Do not enable reverse protection. The VPG definition is kept with the status Nee ```yaml Type: SwitchParameter -Parameter Sets: disableReverseProtection +Parameter Sets: (All) Aliases: -Required: True +Required: False Position: Named Default value: None Accept pipeline input: False @@ -132,13 +154,28 @@ Use this switch to Prevent the protected virtual machines from being deleted in ```yaml Type: SwitchParameter -Parameter Sets: keepSourceVms +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vpgIdentifier +ID(s) of the VPG(s) you want to move. + +```yaml +Type: Guid[] +Parameter Sets: id, commitId Aliases: Required: True Position: Named Default value: None -Accept pipeline input: False +Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` @@ -147,7 +184,7 @@ Name(s) of the VPG(s) you want to move. ```yaml Type: String[] -Parameter Sets: (All) +Parameter Sets: commitName, name Aliases: Required: True