From a891a4914df420d2d98397522917eace1cb2d5f3 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Sun, 8 Mar 2020 14:39:34 -0400 Subject: [PATCH 01/29] Create Get-ZAPlannerSite.ps1 --- ZertoApiWrapper/Public/Get-ZAPlannerSite.ps1 | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 ZertoApiWrapper/Public/Get-ZAPlannerSite.ps1 diff --git a/ZertoApiWrapper/Public/Get-ZAPlannerSite.ps1 b/ZertoApiWrapper/Public/Get-ZAPlannerSite.ps1 new file mode 100644 index 0000000..44adc6c --- /dev/null +++ b/ZertoApiWrapper/Public/Get-ZAPlannerSite.ps1 @@ -0,0 +1,22 @@ +<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #> +function Get-ZAPlannerSite { + [cmdletbinding()] + param( + [Parameter( + HelpMessage = "The site identifier(s) for which to return detailed information." + )] + [ValidateNotNullOrEmpty()] + [string[]]$siteIdentifier + ) + $uri = "planner/sites" + if ( -not [String]::IsNullorEmpty($siteIdentifier) ) { + $entry = foreach ($id in $siteIdentifier) { + "{0}/{1}" -f $uri, $id + } + } else { + $entry = $uri + } + foreach ($uri in $entry) { + Invoke-ZARestRequest -uri $uri + } +} From d35d9d7cf40f5b2bdc79bb87c44958191bbca5d8 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Sun, 8 Mar 2020 14:40:22 -0400 Subject: [PATCH 02/29] Create Get-ZAPlannerStatsReport.ps1 --- .../Public/Get-ZAPlannerStatsReport.ps1 | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 ZertoApiWrapper/Public/Get-ZAPlannerStatsReport.ps1 diff --git a/ZertoApiWrapper/Public/Get-ZAPlannerStatsReport.ps1 b/ZertoApiWrapper/Public/Get-ZAPlannerStatsReport.ps1 new file mode 100644 index 0000000..e1d6f69 --- /dev/null +++ b/ZertoApiWrapper/Public/Get-ZAPlannerStatsReport.ps1 @@ -0,0 +1,60 @@ +<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #> +function Get-ZAPlannerStatsReport { + [cmdletbinding()] + param( + [Parameter( + Mandatory, + HelpMessage = "The site identifier(s) for which to return detailed information." + )] + [ValidateNotNullOrEmpty()] + [string]$siteIdentifier, + [Parameter( + Mandatory, + HelpMessage = "Type of target recovery site." + )] + [ValidateSet('azure', 'vcenter', 'vcd', 'scvmm', 'aws')] + [string]$recoveryType, + [Parameter( + Mandatory, + HelpMessage = "Identifiers of the VMs you want to recover at the target recovery site." + )] + [ValidateNotNullOrEmpty()] + [string[]]$vmIdentifier, + [Parameter( + HelpMessage = "The desired journal history in hours. The default is 24 hours. Limited to a 1 hour up to 720 hours, or the equivalent of 30 days" + )] + [ValidateRange(1, 720)] + [Int]$desiredJournalHistory = 24, + [Parameter( + HelpMessage = "The earliest timestamp of an event to return, in RFC 3339 standard. ('1970-01-01T00:00:00Z'). The default is one year ago." + )] + [ValidateNotNullOrEmpty()] + [string]$startDate, + [Parameter( + HelpMessage = "The latest timestamp of an event to return, in RFC 3339 standard. ('1970-01-01T00:00:00Z'). The default is the current time." + )] + [ValidateNotNullOrEmpty()] + [string]$endDate + ) + $uri = "planner/reports/stats" + $body = @{ + siteIdentifier = $siteIdentifier + recoveryType = $recoveryType + desiredJournalHistory = $desiredJournalHistory + vms = New-Object System.Collections.Generic.List[psobject] + } + if ( -not [String]::IsNullOrEmpty($startDate) ) { + $body['startDate'] = $startDate + } + if ( -not [String]::IsNullOrEmpty($endDate) ) { + $body['endDate'] = $endDate + } + foreach ($vmId in $vmIdentifier) { + $body['vms'].Add(@{'identifier' = $vmId; 'desiredJournalHistory' = $desiredJournalHistory }) + } + ($body | ConvertTo-Json) + $reportId = Invoke-ZARestRequest -uri $uri -method POST -body ($body | ConvertTo-Json) + $reportId.reportId + $uri = '{0}?reportId={1}' -f $uri, $reportId.reportId + Invoke-ZARestRequest -uri $uri +} From 169e628c7b59c9e0f8fc3eb3aadb97e03a72fb30 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Sun, 8 Mar 2020 14:57:19 -0400 Subject: [PATCH 03/29] Remove Debugging Output --- ZertoApiWrapper/Public/Get-ZAPlannerStatsReport.ps1 | 2 -- 1 file changed, 2 deletions(-) diff --git a/ZertoApiWrapper/Public/Get-ZAPlannerStatsReport.ps1 b/ZertoApiWrapper/Public/Get-ZAPlannerStatsReport.ps1 index e1d6f69..e247c86 100644 --- a/ZertoApiWrapper/Public/Get-ZAPlannerStatsReport.ps1 +++ b/ZertoApiWrapper/Public/Get-ZAPlannerStatsReport.ps1 @@ -52,9 +52,7 @@ function Get-ZAPlannerStatsReport { foreach ($vmId in $vmIdentifier) { $body['vms'].Add(@{'identifier' = $vmId; 'desiredJournalHistory' = $desiredJournalHistory }) } - ($body | ConvertTo-Json) $reportId = Invoke-ZARestRequest -uri $uri -method POST -body ($body | ConvertTo-Json) - $reportId.reportId $uri = '{0}?reportId={1}' -f $uri, $reportId.reportId Invoke-ZARestRequest -uri $uri } From 1317a6c039a36fc12451e29231aa535ceb767a68 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Sun, 8 Mar 2020 17:33:24 -0400 Subject: [PATCH 04/29] Create Get-ZAPlannerJournalSizeReport.ps1 --- .../Public/Get-ZAPlannerJournalSizeReport.ps1 | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 ZertoApiWrapper/Public/Get-ZAPlannerJournalSizeReport.ps1 diff --git a/ZertoApiWrapper/Public/Get-ZAPlannerJournalSizeReport.ps1 b/ZertoApiWrapper/Public/Get-ZAPlannerJournalSizeReport.ps1 new file mode 100644 index 0000000..5ea91a5 --- /dev/null +++ b/ZertoApiWrapper/Public/Get-ZAPlannerJournalSizeReport.ps1 @@ -0,0 +1,58 @@ +<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #> +function Get-ZAPlannerJournalSizeReport { + [cmdletbinding()] + param( + [Parameter( + Mandatory, + HelpMessage = "The site identifier(s) for which to return detailed information." + )] + [ValidateNotNullOrEmpty()] + [string]$siteIdentifier, + [Parameter( + Mandatory, + HelpMessage = "Type of target recovery site." + )] + [ValidateSet('azure', 'vcenter', 'vcd', 'scvmm', 'aws')] + [string]$recoveryType, + [Parameter( + Mandatory, + HelpMessage = "Identifiers of the VMs you want to recover at the target recovery site." + )] + [ValidateNotNullOrEmpty()] + [string[]]$vmIdentifier, + [Parameter( + HelpMessage = "The desired journal history in hours. The default is 24 hours. Limited to a 1 hour up to 720 hours, or the equivalent of 30 days" + )] + [ValidateRange(1, 720)] + [Int]$desiredJournalHistory = 24, + [Parameter( + HelpMessage = "The earliest timestamp of an event to return, in RFC 3339 standard. ('1970-01-01T00:00:00Z'). The default is one year ago." + )] + [ValidateNotNullOrEmpty()] + [string]$startDate, + [Parameter( + HelpMessage = "The latest timestamp of an event to return, in RFC 3339 standard. ('1970-01-01T00:00:00Z'). The default is the current time." + )] + [ValidateNotNullOrEmpty()] + [string]$endDate + ) + $uri = "planner/reports/stats/journal-size" + $body = @{ + siteIdentifier = $siteIdentifier + recoveryType = $recoveryType + desiredJournalHistory = $desiredJournalHistory + vms = New-Object System.Collections.Generic.List[psobject] + } + if ( -not [String]::IsNullOrEmpty($startDate) ) { + $body['startDate'] = $startDate + } + if ( -not [String]::IsNullOrEmpty($endDate) ) { + $body['endDate'] = $endDate + } + foreach ($vmId in $vmIdentifier) { + $body['vms'].Add(@{'identifier' = $vmId; 'desiredJournalHistory' = $desiredJournalHistory }) + } + $reportId = Invoke-ZARestRequest -uri $uri -method POST -body ($body | ConvertTo-Json) + $uri = '{0}?reportId={1}' -f $uri, $reportId.reportId + Invoke-ZARestRequest -uri $uri +} From ce5a64c6834f3bed0b2bdf1371ceb23b98bd88ef Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Sun, 8 Mar 2020 17:33:27 -0400 Subject: [PATCH 05/29] Create Get-ZAPlannerNetworkPerformanceReport.ps1 --- .../Get-ZAPlannerNetworkPerformanceReport.ps1 | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 ZertoApiWrapper/Public/Get-ZAPlannerNetworkPerformanceReport.ps1 diff --git a/ZertoApiWrapper/Public/Get-ZAPlannerNetworkPerformanceReport.ps1 b/ZertoApiWrapper/Public/Get-ZAPlannerNetworkPerformanceReport.ps1 new file mode 100644 index 0000000..c0a6b12 --- /dev/null +++ b/ZertoApiWrapper/Public/Get-ZAPlannerNetworkPerformanceReport.ps1 @@ -0,0 +1,58 @@ +<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #> +function Get-ZAPlannerNetworkPerformanceReport { + [cmdletbinding()] + param( + [Parameter( + Mandatory, + HelpMessage = "The site identifier(s) for which to return detailed information." + )] + [ValidateNotNullOrEmpty()] + [string]$siteIdentifier, + [Parameter( + Mandatory, + HelpMessage = "Type of target recovery site." + )] + [ValidateSet('azure', 'vcenter', 'vcd', 'scvmm', 'aws')] + [string]$recoveryType, + [Parameter( + Mandatory, + HelpMessage = "Identifiers of the VMs you want to recover at the target recovery site." + )] + [ValidateNotNullOrEmpty()] + [string[]]$vmIdentifier, + [Parameter( + HelpMessage = "The desired sample interval in seconds. The default is 3600 seconds (1 Hour). Limited to a 60 second to 86,400 second (24 Hour) interval" + )] + [ValidateRange(60, 86400)] + [Int]$interval = 3600, + [Parameter( + HelpMessage = "The earliest timestamp of an event to return, in RFC 3339 standard. ('1970-01-01T00:00:00Z'). The default is one year ago." + )] + [ValidateNotNullOrEmpty()] + [string]$startDate, + [Parameter( + HelpMessage = "The latest timestamp of an event to return, in RFC 3339 standard. ('1970-01-01T00:00:00Z'). The default is the current time." + )] + [ValidateNotNullOrEmpty()] + [string]$endDate + ) + $uri = "planner/reports/network-performance" + $body = @{ + siteIdentifier = $siteIdentifier + recoveryType = $recoveryType + interval = $interval + vmIdentifiers = New-Object System.Collections.Generic.List[psobject] + } + if ( -not [String]::IsNullOrEmpty($startDate) ) { + $body['startDate'] = $startDate + } + if ( -not [String]::IsNullOrEmpty($endDate) ) { + $body['endDate'] = $endDate + } + foreach ($vmId in $vmIdentifier) { + $body['vmIdentifiers'].Add($vmId) + } + $reportId = Invoke-ZARestRequest -uri $uri -method POST -body ($body | ConvertTo-Json) + $uri = '{0}?reportId={1}' -f $uri, $reportId.reportId + Invoke-ZARestRequest -uri $uri +} From 7fc0a5f5793a8267e0979e403a19429fbe915a16 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Sun, 8 Mar 2020 17:33:31 -0400 Subject: [PATCH 06/29] Create Get-ZAPlannerWanReport.ps1 --- .../Public/Get-ZAPlannerWanReport.ps1 | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 ZertoApiWrapper/Public/Get-ZAPlannerWanReport.ps1 diff --git a/ZertoApiWrapper/Public/Get-ZAPlannerWanReport.ps1 b/ZertoApiWrapper/Public/Get-ZAPlannerWanReport.ps1 new file mode 100644 index 0000000..f678504 --- /dev/null +++ b/ZertoApiWrapper/Public/Get-ZAPlannerWanReport.ps1 @@ -0,0 +1,52 @@ +<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #> +function Get-ZAPlannerWanReport { + [cmdletbinding()] + param( + [Parameter( + Mandatory, + HelpMessage = "The site identifier(s) for which to return detailed information." + )] + [ValidateNotNullOrEmpty()] + [string]$siteIdentifier, + [Parameter( + Mandatory, + HelpMessage = "Type of target recovery site." + )] + [ValidateSet('azure', 'vcenter', 'vcd', 'scvmm', 'aws')] + [string]$recoveryType, + [Parameter( + Mandatory, + HelpMessage = "Identifiers of the VMs you want to recover at the target recovery site." + )] + [ValidateNotNullOrEmpty()] + [string[]]$vmIdentifier, + [Parameter( + HelpMessage = "The earliest timestamp of an event to return, in RFC 3339 standard. ('1970-01-01T00:00:00Z'). The default is one year ago." + )] + [ValidateNotNullOrEmpty()] + [string]$startDate, + [Parameter( + HelpMessage = "The latest timestamp of an event to return, in RFC 3339 standard. ('1970-01-01T00:00:00Z'). The default is the current time." + )] + [ValidateNotNullOrEmpty()] + [string]$endDate + ) + $uri = "planner/reports/stats/wan" + $body = @{ + siteIdentifier = $siteIdentifier + recoveryType = $recoveryType + vmIdentifiers = New-Object System.Collections.Generic.List[psobject] + } + if ( -not [String]::IsNullOrEmpty($startDate) ) { + $body['startDate'] = $startDate + } + if ( -not [String]::IsNullOrEmpty($endDate) ) { + $body['endDate'] = $endDate + } + foreach ($vmId in $vmIdentifier) { + $body['vmIdentifiers'].Add($vmId) + } + $reportId = Invoke-ZARestRequest -uri $uri -method POST -body ($body | ConvertTo-Json) + $uri = '{0}?reportId={1}' -f $uri, $reportId.reportId + Invoke-ZARestRequest -uri $uri +} From 02e50d9cd63fa96166ba57411274159c84377a7c Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Sun, 8 Mar 2020 17:33:36 -0400 Subject: [PATCH 07/29] Create Get-ZAPlannerZcasReport.ps1 --- .../Public/Get-ZAPlannerZcasReport.ps1 | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 ZertoApiWrapper/Public/Get-ZAPlannerZcasReport.ps1 diff --git a/ZertoApiWrapper/Public/Get-ZAPlannerZcasReport.ps1 b/ZertoApiWrapper/Public/Get-ZAPlannerZcasReport.ps1 new file mode 100644 index 0000000..c278502 --- /dev/null +++ b/ZertoApiWrapper/Public/Get-ZAPlannerZcasReport.ps1 @@ -0,0 +1,54 @@ +<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #> +function Get-ZAPlannerZcasReport { + [cmdletbinding()] + param( + [Parameter( + Mandatory, + HelpMessage = "The site identifier(s) for which to return detailed information." + )] + [ValidateNotNullOrEmpty()] + [string]$siteIdentifier, + [Parameter( + Mandatory, + HelpMessage = "Type of target recovery site." + )] + [ValidateSet('azure', 'vcenter', 'vcd', 'scvmm', 'aws')] + [string]$recoveryType, + [Parameter( + Mandatory, + HelpMessage = "Identifiers of the VMs you want to recover at the target recovery site." + )] + [ValidateNotNullOrEmpty()] + [string[]]$vmIdentifier, + [Parameter( + HelpMessage = "The earliest timestamp of an event to return, in RFC 3339 standard. ('1970-01-01T00:00:00Z'). The default is one year ago." + )] + [ValidateNotNullOrEmpty()] + [string]$startDate, + [Parameter( + HelpMessage = "The latest timestamp of an event to return, in RFC 3339 standard. ('1970-01-01T00:00:00Z'). The default is the current time." + )] + [ValidateNotNullOrEmpty()] + [string]$endDate + ) + $uri = "planner/reports/stats/zcas" + $body = @{ + siteIdentifier = $siteIdentifier + recoveryType = $recoveryType + vmIdentifiers = New-Object System.Collections.Generic.List[psobject] + } + if ( -not [String]::IsNullOrEmpty($startDate) ) { + $body['startDate'] = $startDate + } + if ( -not [String]::IsNullOrEmpty($endDate) ) { + $body['endDate'] = $endDate + } + foreach ($vmId in $vmIdentifier) { + $body['vmIdentifiers'].Add($vmId) + } + #$body | ConvertTo-Json + $reportId = Invoke-ZARestRequest -uri $uri -method POST -body ($body | ConvertTo-Json) + #Start-Sleep 10 + $uri = '{0}?reportId={1}' -f $uri, $reportId.reportId + Invoke-ZARestRequest -uri $uri +} From 8bd865d83d9e59aa9a6117983406bd0d54f58bda Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Sun, 8 Mar 2020 22:45:51 -0400 Subject: [PATCH 08/29] Create Template Help Files --- docs/Get-ZAPlannerJournalSizeReport.md | 139 +++++++++++++++++ docs/Get-ZAPlannerNetworkPerformanceReport.md | 140 ++++++++++++++++++ docs/Get-ZAPlannerSite.md | 57 +++++++ docs/Get-ZAPlannerStatsReport.md | 139 +++++++++++++++++ docs/Get-ZAPlannerWanReport.md | 122 +++++++++++++++ docs/Get-ZAPlannerZcasReport.md | 122 +++++++++++++++ 6 files changed, 719 insertions(+) create mode 100644 docs/Get-ZAPlannerJournalSizeReport.md create mode 100644 docs/Get-ZAPlannerNetworkPerformanceReport.md create mode 100644 docs/Get-ZAPlannerSite.md create mode 100644 docs/Get-ZAPlannerStatsReport.md create mode 100644 docs/Get-ZAPlannerWanReport.md create mode 100644 docs/Get-ZAPlannerZcasReport.md diff --git a/docs/Get-ZAPlannerJournalSizeReport.md b/docs/Get-ZAPlannerJournalSizeReport.md new file mode 100644 index 0000000..3579885 --- /dev/null +++ b/docs/Get-ZAPlannerJournalSizeReport.md @@ -0,0 +1,139 @@ +--- +external help file: ZertoApiWrapper-help.xml +Module Name: ZertoApiWrapper +online version: +schema: 2.0.0 +--- + +# Get-ZAPlannerJournalSizeReport + +## SYNOPSIS + +## SYNTAX + +``` +Get-ZAPlannerJournalSizeReport [-siteIdentifier] [-recoveryType] [-vmIdentifier] + [[-desiredJournalHistory] ] [[-startDate] ] [[-endDate] ] [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -desiredJournalHistory +The desired journal history in hours. +The default is 24 hours. +Limited to a 1 hour up to 720 hours, or the equivalent of 30 days + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: 24 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -endDate +The latest timestamp of an event to return, in RFC 3339 standard. +('1970-01-01T00:00:00Z'). +The default is the current time. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 6 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -recoveryType +Type of target recovery site. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -siteIdentifier +The site identifier(s) for which to return detailed information. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -startDate +The earliest timestamp of an event to return, in RFC 3339 standard. +('1970-01-01T00:00:00Z'). +The default is one year ago. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vmIdentifier +Identifiers of the VMs you want to recover at the target recovery site. + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. +For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/docs/Get-ZAPlannerNetworkPerformanceReport.md b/docs/Get-ZAPlannerNetworkPerformanceReport.md new file mode 100644 index 0000000..5dd4498 --- /dev/null +++ b/docs/Get-ZAPlannerNetworkPerformanceReport.md @@ -0,0 +1,140 @@ +--- +external help file: ZertoApiWrapper-help.xml +Module Name: ZertoApiWrapper +online version: +schema: 2.0.0 +--- + +# Get-ZAPlannerNetworkPerformanceReport + +## SYNOPSIS + +## SYNTAX + +``` +Get-ZAPlannerNetworkPerformanceReport [-siteIdentifier] [-recoveryType] + [-vmIdentifier] [[-interval] ] [[-startDate] ] [[-endDate] ] + [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -endDate +The latest timestamp of an event to return, in RFC 3339 standard. +('1970-01-01T00:00:00Z'). +The default is the current time. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 6 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -interval +The desired sample interval in seconds. +The default is 3600 seconds (1 Hour). +Limited to a 60 second to 86,400 second (24 Hour) interval + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: 3600 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -recoveryType +Type of target recovery site. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -siteIdentifier +The site identifier(s) for which to return detailed information. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -startDate +The earliest timestamp of an event to return, in RFC 3339 standard. +('1970-01-01T00:00:00Z'). +The default is one year ago. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vmIdentifier +Identifiers of the VMs you want to recover at the target recovery site. + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. +For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/docs/Get-ZAPlannerSite.md b/docs/Get-ZAPlannerSite.md new file mode 100644 index 0000000..986ee4e --- /dev/null +++ b/docs/Get-ZAPlannerSite.md @@ -0,0 +1,57 @@ +--- +external help file: ZertoApiWrapper-help.xml +Module Name: ZertoApiWrapper +online version: +schema: 2.0.0 +--- + +# Get-ZAPlannerSite + +## SYNOPSIS + +## SYNTAX + +``` +Get-ZAPlannerSite [[-siteIdentifier] ] [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -siteIdentifier +The site identifier(s) for which to return detailed information. + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. +For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/docs/Get-ZAPlannerStatsReport.md b/docs/Get-ZAPlannerStatsReport.md new file mode 100644 index 0000000..63195d2 --- /dev/null +++ b/docs/Get-ZAPlannerStatsReport.md @@ -0,0 +1,139 @@ +--- +external help file: ZertoApiWrapper-help.xml +Module Name: ZertoApiWrapper +online version: +schema: 2.0.0 +--- + +# Get-ZAPlannerStatsReport + +## SYNOPSIS + +## SYNTAX + +``` +Get-ZAPlannerStatsReport [-siteIdentifier] [-recoveryType] [-vmIdentifier] + [[-desiredJournalHistory] ] [[-startDate] ] [[-endDate] ] [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -desiredJournalHistory +The desired journal history in hours. +The default is 24 hours. +Limited to a 1 hour up to 720 hours, or the equivalent of 30 days + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: 24 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -endDate +The latest timestamp of an event to return, in RFC 3339 standard. +('1970-01-01T00:00:00Z'). +The default is the current time. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 6 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -recoveryType +Type of target recovery site. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -siteIdentifier +The site identifier(s) for which to return detailed information. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -startDate +The earliest timestamp of an event to return, in RFC 3339 standard. +('1970-01-01T00:00:00Z'). +The default is one year ago. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vmIdentifier +Identifiers of the VMs you want to recover at the target recovery site. + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. +For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/docs/Get-ZAPlannerWanReport.md b/docs/Get-ZAPlannerWanReport.md new file mode 100644 index 0000000..e4c48c0 --- /dev/null +++ b/docs/Get-ZAPlannerWanReport.md @@ -0,0 +1,122 @@ +--- +external help file: ZertoApiWrapper-help.xml +Module Name: ZertoApiWrapper +online version: +schema: 2.0.0 +--- + +# Get-ZAPlannerWanReport + +## SYNOPSIS + +## SYNTAX + +``` +Get-ZAPlannerWanReport [-siteIdentifier] [-recoveryType] [-vmIdentifier] + [[-startDate] ] [[-endDate] ] [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -endDate +The latest timestamp of an event to return, in RFC 3339 standard. +('1970-01-01T00:00:00Z'). +The default is the current time. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -recoveryType +Type of target recovery site. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -siteIdentifier +The site identifier(s) for which to return detailed information. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -startDate +The earliest timestamp of an event to return, in RFC 3339 standard. +('1970-01-01T00:00:00Z'). +The default is one year ago. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vmIdentifier +Identifiers of the VMs you want to recover at the target recovery site. + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. +For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/docs/Get-ZAPlannerZcasReport.md b/docs/Get-ZAPlannerZcasReport.md new file mode 100644 index 0000000..9dd5bd5 --- /dev/null +++ b/docs/Get-ZAPlannerZcasReport.md @@ -0,0 +1,122 @@ +--- +external help file: ZertoApiWrapper-help.xml +Module Name: ZertoApiWrapper +online version: +schema: 2.0.0 +--- + +# Get-ZAPlannerZcasReport + +## SYNOPSIS + +## SYNTAX + +``` +Get-ZAPlannerZcasReport [-siteIdentifier] [-recoveryType] [-vmIdentifier] + [[-startDate] ] [[-endDate] ] [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -endDate +The latest timestamp of an event to return, in RFC 3339 standard. +('1970-01-01T00:00:00Z'). +The default is the current time. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -recoveryType +Type of target recovery site. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -siteIdentifier +The site identifier(s) for which to return detailed information. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -startDate +The earliest timestamp of an event to return, in RFC 3339 standard. +('1970-01-01T00:00:00Z'). +The default is one year ago. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vmIdentifier +Identifiers of the VMs you want to recover at the target recovery site. + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. +For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS From c2f554dca13940f051ff2a045c00a28f758d3282 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Wed, 18 Mar 2020 13:54:58 -0400 Subject: [PATCH 09/29] Update Get-ZAPlannerSite.md --- docs/Get-ZAPlannerSite.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/Get-ZAPlannerSite.md b/docs/Get-ZAPlannerSite.md index 986ee4e..c1e7554 100644 --- a/docs/Get-ZAPlannerSite.md +++ b/docs/Get-ZAPlannerSite.md @@ -1,13 +1,14 @@ --- external help file: ZertoApiWrapper-help.xml Module Name: ZertoApiWrapper -online version: +online version: https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAPlannerSite.md schema: 2.0.0 --- # Get-ZAPlannerSite ## SYNOPSIS +Retrieve all active Planner sites for a specific account – includes ID, Name and Type or retrieves datacenter, host, and VMs for a specific site. ## SYNTAX @@ -16,16 +17,23 @@ Get-ZAPlannerSite [[-siteIdentifier] ] [] ``` ## DESCRIPTION -{{Fill in the Description}} +Retrieve all active Planner sites for a specific account – includes ID, Name and Type or retrieves datacenter, host, and VMs for a specific site. ## EXAMPLES ### Example 1 ```powershell -PS C:\> {{ Add example code here }} +PS C:\> Get-ZAPlannerSite ``` -{{ Add example description here }} +Retrieve all active Planner sites for a specific account + +### Example 2 +```powershell +PS C:\> Get-ZAPlannerSite -siteIdentifier '0123-45676-09876' +``` + +Retrieves datacenter, host, and VMs for site with Identifier '0123-45676-09876'. ## PARAMETERS @@ -55,3 +63,5 @@ For more information, see about_CommonParameters (http://go.microsoft.com/fwlink ## NOTES ## RELATED LINKS +[Zerto Analytics Sites Planner Endpoint](https://docs.api.zerto.com/#/Planner/get_v2_planner_sites) +[Zerto Analytics Single Site Planner Endpoint](https://docs.api.zerto.com/#/Planner/get_v2_planner_sites) From 07f92583f80938e2426ba4b745232fa0c2132372 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Wed, 18 Mar 2020 13:57:12 -0400 Subject: [PATCH 10/29] Update Single Site URL --- docs/Get-ZAPlannerSite.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Get-ZAPlannerSite.md b/docs/Get-ZAPlannerSite.md index c1e7554..d2a0387 100644 --- a/docs/Get-ZAPlannerSite.md +++ b/docs/Get-ZAPlannerSite.md @@ -64,4 +64,4 @@ For more information, see about_CommonParameters (http://go.microsoft.com/fwlink ## RELATED LINKS [Zerto Analytics Sites Planner Endpoint](https://docs.api.zerto.com/#/Planner/get_v2_planner_sites) -[Zerto Analytics Single Site Planner Endpoint](https://docs.api.zerto.com/#/Planner/get_v2_planner_sites) +[Zerto Analytics Single Site Planner Endpoint](https://docs.api.zerto.com/#/Planner/get_v2_planner_sites__siteIdentifier_) From e516a24e38ebaebe1a9b8fb05a2aaccf499ea8cd Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 19 Mar 2020 09:19:48 -0400 Subject: [PATCH 11/29] Update Get-ZAPlannerJournalSizeReport.md --- docs/Get-ZAPlannerJournalSizeReport.md | 32 ++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/docs/Get-ZAPlannerJournalSizeReport.md b/docs/Get-ZAPlannerJournalSizeReport.md index 3579885..719cae7 100644 --- a/docs/Get-ZAPlannerJournalSizeReport.md +++ b/docs/Get-ZAPlannerJournalSizeReport.md @@ -1,13 +1,14 @@ --- external help file: ZertoApiWrapper-help.xml Module Name: ZertoApiWrapper -online version: +online version: https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAPlannerJournalSizeReport.md schema: 2.0.0 --- # Get-ZAPlannerJournalSizeReport ## SYNOPSIS +Create a report request to retrieve the Journal Size for a specific VMs list, and timeframe. ## SYNTAX @@ -17,16 +18,37 @@ Get-ZAPlannerJournalSizeReport [-siteIdentifier] [-recoveryType] {{ Add example code here }} +PS C:\> Get-ZAPlannerJournalSizeReport -siteIdentifier '1234567890-01923141' -recoveryType VMware -vmIdentifier 'vmIdentifier1', 'vmIdentifier2' ``` -{{ Add example description here }} +Gets a Journal report for VMs with identifiers 'vmIdentifier1' and 'vmIdentifier2' at source siteIdentifier '1234567890-01923141' where the target recovery location is VMware. The report will cover a Journal History of 24 hours. This will use all data contained in Zerto Analytics to create the Journal report. + +### Example 2 +```powershell +PS C:\> Get-ZAPlannerJournalSizeReport -siteIdentifier '1234567890-01923141' -recoveryType VMware -vmIdentifier 'vmIdentifier1', 'vmIdentifier2' -desiredJournalHistory 96 +``` + +Gets a Journal report for VMs with identifiers 'vmIdentifier1' and 'vmIdentifier2' at source siteIdentifier '1234567890-01923141' where the target recovery location is VMware. The report will cover a Journal History of 96 hours (4 days). This will use all data contained in Zerto Analytics to create the Journal report. + +### Example 3 +```powershell +PS C:\> Get-ZAPlannerJournalSizeReport -siteIdentifier '1234567890-01923141' -recoveryType VMware -vmIdentifier 'vmIdentifier1', 'vmIdentifier2' -desiredJournalHistory 96 -startDate '2020-01-01' +``` + +Gets a Journal report for VMs with identifiers 'vmIdentifier1' and 'vmIdentifier2' at source siteIdentifier '1234567890-01923141' where the target recovery location is VMware. The report will cover a Journal History of 96 hours (4 days). This will use all data starting from Jan 1st to today contained in Zerto Analytics to create the Journal report. + +### Example 4 +```powershell +PS C:\> Get-ZAPlannerJournalSizeReport -siteIdentifier '1234567890-01923141' -recoveryType VMware -vmIdentifier 'vmIdentifier1', 'vmIdentifier2' -desiredJournalHistory 96 -startDate '2020-01-01' -endDate '2020-01-30' +``` + +Gets a Journal report for VMs with identifiers 'vmIdentifier1' and 'vmIdentifier2' at source siteIdentifier '1234567890-01923141' where the target recovery location is VMware. The report will cover a Journal History of 96 hours (4 days). This will use all data starting from Jan 1st to Jan 30th contained in Zerto Analytics to create the Journal report. ## PARAMETERS @@ -137,3 +159,5 @@ For more information, see about_CommonParameters (http://go.microsoft.com/fwlink ## NOTES ## RELATED LINKS +[Zerto Planner Journal Size Report - Post](https://docs.api.zerto.com/#/Planner/post_v2_planner_reports_stats_journal_size) +[Zerto Planner Journal Size Report - Get](https://docs.api.zerto.com/#/Planner/get_v2_planner_reports_stats_journal_size) From eccc5f27f335234a444ed8ca3bb8bf76f48744a9 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 19 Mar 2020 09:21:05 -0400 Subject: [PATCH 12/29] Update Get-ZAPlannerNetworkPerformanceReport.md --- docs/Get-ZAPlannerNetworkPerformanceReport.md | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/docs/Get-ZAPlannerNetworkPerformanceReport.md b/docs/Get-ZAPlannerNetworkPerformanceReport.md index 5dd4498..4f17ecc 100644 --- a/docs/Get-ZAPlannerNetworkPerformanceReport.md +++ b/docs/Get-ZAPlannerNetworkPerformanceReport.md @@ -1,13 +1,15 @@ --- external help file: ZertoApiWrapper-help.xml Module Name: ZertoApiWrapper -online version: +online version: https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAPlannerNetworkPerformanceReport.md schema: 2.0.0 --- # Get-ZAPlannerNetworkPerformanceReport ## SYNOPSIS +Create a report request to retrieve the Network Performance for a specific VMs list, and timeframe. + ## SYNTAX @@ -18,16 +20,30 @@ Get-ZAPlannerNetworkPerformanceReport [-siteIdentifier] [-recoveryType] ``` ## DESCRIPTION -{{Fill in the Description}} +Create a report request to retrieve the Network Performance for a specific VMs list, and timeframe. ## EXAMPLES ### Example 1 ```powershell -PS C:\> {{ Add example code here }} +PS C:\> Get-ZAPlannerNetworkPerformanceReport -siteIdentifier '1234567890-01923141' -recoveryType VMware -vmIdentifier 'vmIdentifier1', 'vmIdentifier2' ``` -{{ Add example description here }} +Gets a Network Performance report for VMs with identifiers 'vmIdentifier1' and 'vmIdentifier2' at source siteIdentifier '1234567890-01923141' where the target recovery location is VMware. This will use all data contained in Zerto Analytics to create the Journal report. + +### Example 2 +```powershell +PS C:\> Get-ZAPlannerNetworkPerformanceReport -siteIdentifier '1234567890-01923141' -recoveryType VMware -vmIdentifier 'vmIdentifier1', 'vmIdentifier2' -startDate '2020-01-01' -interval 86400 +``` + +Gets a Network Performance report for VMs with identifiers 'vmIdentifier1' and 'vmIdentifier2' at source siteIdentifier '1234567890-01923141' where the target recovery location is VMware. This will use data contained in Zerto Analytics starting Jan 1st, 2020 ending on the day the report is run to create the Journal report. Sample reporting interval will be 86400 seconds (1 day). + +### Example 3 +```powershell +PS C:\> Get-ZAPlannerNetworkPerformanceReport -siteIdentifier '1234567890-01923141' -recoveryType VMware -vmIdentifier 'vmIdentifier1', 'vmIdentifier2' -startDate '2020-01-01' -endDate '2020-01-30' -interval 86400 +``` + +Gets a Network Performance report for VMs with identifiers 'vmIdentifier1' and 'vmIdentifier2' at source siteIdentifier '1234567890-01923141' where the target recovery location is VMware. This will use data contained in Zerto Analytics starting Jan 1st, 2020 ending on Jan 30th, 2020 to create the Journal report. Sample reporting interval will be 86400 seconds (1 day). ## PARAMETERS @@ -138,3 +154,6 @@ For more information, see about_CommonParameters (http://go.microsoft.com/fwlink ## NOTES ## RELATED LINKS +[Zerto Analytics Planner Network-Performance API Endpoint - POST](https://docs.api.zerto.com/#/Planner/post_v2_planner_reports_network_performance) +[Zerto Analytics Planner Network-Performance API Endpoint - GET](https://docs.api.zerto.com/#/Planner/get_v2_planner_reports_network_performance) + From 3e980dc195107f8dc5105b174f8d3e101ab09333 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 19 Mar 2020 16:25:28 -0400 Subject: [PATCH 13/29] Add Online Help URI --- docs/Get-ZAPlannerStatsReport.md | 2 +- docs/Get-ZAPlannerWanReport.md | 2 +- docs/Get-ZAPlannerZcasReport.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Get-ZAPlannerStatsReport.md b/docs/Get-ZAPlannerStatsReport.md index 63195d2..cd2e4b9 100644 --- a/docs/Get-ZAPlannerStatsReport.md +++ b/docs/Get-ZAPlannerStatsReport.md @@ -1,7 +1,7 @@ --- external help file: ZertoApiWrapper-help.xml Module Name: ZertoApiWrapper -online version: +online version: https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAPlannerStatsReport.md schema: 2.0.0 --- diff --git a/docs/Get-ZAPlannerWanReport.md b/docs/Get-ZAPlannerWanReport.md index e4c48c0..321021a 100644 --- a/docs/Get-ZAPlannerWanReport.md +++ b/docs/Get-ZAPlannerWanReport.md @@ -1,7 +1,7 @@ --- external help file: ZertoApiWrapper-help.xml Module Name: ZertoApiWrapper -online version: +online version: https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAPlannerWanReport.md schema: 2.0.0 --- diff --git a/docs/Get-ZAPlannerZcasReport.md b/docs/Get-ZAPlannerZcasReport.md index 9dd5bd5..911412f 100644 --- a/docs/Get-ZAPlannerZcasReport.md +++ b/docs/Get-ZAPlannerZcasReport.md @@ -1,7 +1,7 @@ --- external help file: ZertoApiWrapper-help.xml Module Name: ZertoApiWrapper -online version: +online version: https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAPlannerZcasReport.md schema: 2.0.0 --- From a8b9ec3a009774c6c05cd71ee42121822eda58be Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 2 Apr 2020 15:12:04 -0400 Subject: [PATCH 14/29] Update Help File Formatting --- docs/Get-ZAPlannerJournalSizeReport.md | 4 ++-- docs/Get-ZAPlannerNetworkPerformanceReport.md | 5 ++--- docs/Get-ZAPlannerSite.md | 8 ++++---- docs/Get-ZAPlannerStatsReport.md | 3 +-- docs/Get-ZAPlannerWanReport.md | 3 +-- docs/Get-ZAPlannerZcasReport.md | 3 +-- 6 files changed, 11 insertions(+), 15 deletions(-) diff --git a/docs/Get-ZAPlannerJournalSizeReport.md b/docs/Get-ZAPlannerJournalSizeReport.md index 719cae7..9796b5f 100644 --- a/docs/Get-ZAPlannerJournalSizeReport.md +++ b/docs/Get-ZAPlannerJournalSizeReport.md @@ -149,8 +149,7 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. -For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -159,5 +158,6 @@ For more information, see about_CommonParameters (http://go.microsoft.com/fwlink ## NOTES ## RELATED LINKS + [Zerto Planner Journal Size Report - Post](https://docs.api.zerto.com/#/Planner/post_v2_planner_reports_stats_journal_size) [Zerto Planner Journal Size Report - Get](https://docs.api.zerto.com/#/Planner/get_v2_planner_reports_stats_journal_size) diff --git a/docs/Get-ZAPlannerNetworkPerformanceReport.md b/docs/Get-ZAPlannerNetworkPerformanceReport.md index 4f17ecc..2b8c1eb 100644 --- a/docs/Get-ZAPlannerNetworkPerformanceReport.md +++ b/docs/Get-ZAPlannerNetworkPerformanceReport.md @@ -10,7 +10,6 @@ schema: 2.0.0 ## SYNOPSIS Create a report request to retrieve the Network Performance for a specific VMs list, and timeframe. - ## SYNTAX ``` @@ -144,8 +143,7 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. -For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -154,6 +152,7 @@ For more information, see about_CommonParameters (http://go.microsoft.com/fwlink ## NOTES ## RELATED LINKS + [Zerto Analytics Planner Network-Performance API Endpoint - POST](https://docs.api.zerto.com/#/Planner/post_v2_planner_reports_network_performance) [Zerto Analytics Planner Network-Performance API Endpoint - GET](https://docs.api.zerto.com/#/Planner/get_v2_planner_reports_network_performance) diff --git a/docs/Get-ZAPlannerSite.md b/docs/Get-ZAPlannerSite.md index d2a0387..5003758 100644 --- a/docs/Get-ZAPlannerSite.md +++ b/docs/Get-ZAPlannerSite.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Get-ZAPlannerSite ## SYNOPSIS -Retrieve all active Planner sites for a specific account – includes ID, Name and Type or retrieves datacenter, host, and VMs for a specific site. +Retrieve all active Planner sites for a specific account - includes ID, Name and Type or retrieves datacenter, host, and VMs for a specific site. ## SYNTAX @@ -17,7 +17,7 @@ Get-ZAPlannerSite [[-siteIdentifier] ] [] ``` ## DESCRIPTION -Retrieve all active Planner sites for a specific account – includes ID, Name and Type or retrieves datacenter, host, and VMs for a specific site. +Retrieve all active Planner sites for a specific account - includes ID, Name and Type or retrieves datacenter, host, and VMs for a specific site. ## EXAMPLES @@ -53,8 +53,7 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. -For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -63,5 +62,6 @@ For more information, see about_CommonParameters (http://go.microsoft.com/fwlink ## NOTES ## RELATED LINKS + [Zerto Analytics Sites Planner Endpoint](https://docs.api.zerto.com/#/Planner/get_v2_planner_sites) [Zerto Analytics Single Site Planner Endpoint](https://docs.api.zerto.com/#/Planner/get_v2_planner_sites__siteIdentifier_) diff --git a/docs/Get-ZAPlannerStatsReport.md b/docs/Get-ZAPlannerStatsReport.md index cd2e4b9..dd57171 100644 --- a/docs/Get-ZAPlannerStatsReport.md +++ b/docs/Get-ZAPlannerStatsReport.md @@ -127,8 +127,7 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. -For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/docs/Get-ZAPlannerWanReport.md b/docs/Get-ZAPlannerWanReport.md index 321021a..bb88176 100644 --- a/docs/Get-ZAPlannerWanReport.md +++ b/docs/Get-ZAPlannerWanReport.md @@ -110,8 +110,7 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. -For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/docs/Get-ZAPlannerZcasReport.md b/docs/Get-ZAPlannerZcasReport.md index 911412f..0904caa 100644 --- a/docs/Get-ZAPlannerZcasReport.md +++ b/docs/Get-ZAPlannerZcasReport.md @@ -110,8 +110,7 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. -For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS From 69fb384c89577aaff09003e25c65cfb9fac3bd95 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 2 Apr 2020 15:12:43 -0400 Subject: [PATCH 15/29] Create Get-ZAProtectedVm.ps1 --- ZertoApiWrapper/Public/Get-ZAProtectedVm.ps1 | 50 ++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 ZertoApiWrapper/Public/Get-ZAProtectedVm.ps1 diff --git a/ZertoApiWrapper/Public/Get-ZAProtectedVm.ps1 b/ZertoApiWrapper/Public/Get-ZAProtectedVm.ps1 new file mode 100644 index 0000000..8340275 --- /dev/null +++ b/ZertoApiWrapper/Public/Get-ZAProtectedVm.ps1 @@ -0,0 +1,50 @@ +<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #> +function Get-ZAProtectedVm { + [cmdletbinding(DefaultParameterSetName = "AllVMs")] + param( + [Parameter( + ParameterSetName = "AllVMs", + HelpMessage = "Use this switch when you want a list of all protected VMs. Please be warned this list can be quite large." + )] + [switch]$AllVms, + [Parameter( + ParameterSetName = "IndividualVMs", + Mandatory, + HelpMessage = "A list of VM identifiers to query" + )] + [string[]]$VMIdentifier, + [Parameter( + ParameterSetName = "IndividualVMs", + HelpMessage = "Specify this switch when you would like protected vms' volume information returned" + )] + [switch]$Volumes + ) + + Begin { + + } + + Process { + $BaseUri = "monitoring/protected-vms" + switch ($PSCmdlet.ParameterSetName) { + "AllVMs" { + Invoke-ZARestRequest -uri $BaseUri + } + + "IndividualVMs" { + foreach ($identifier in $VMIdentifier) { + if ($Volumes.IsPresent) { + $Uri = "{0}/{1}/volumes" -f $BaseUri, $identifier + } else { + $uri = $Uri = "{0}/{1}" -f $BaseUri, $identifier + } + Invoke-ZARestRequest -uri $Uri + } + } + } + } + + End { + + } +} From 8e5ced9b871ab968438e096f454f1f94320e5f8c Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 2 Apr 2020 15:12:52 -0400 Subject: [PATCH 16/29] Create Get-ZAProtectedVmReport.ps1 --- .../Public/Get-ZAProtectedVmReport.ps1 | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 ZertoApiWrapper/Public/Get-ZAProtectedVmReport.ps1 diff --git a/ZertoApiWrapper/Public/Get-ZAProtectedVmReport.ps1 b/ZertoApiWrapper/Public/Get-ZAProtectedVmReport.ps1 new file mode 100644 index 0000000..b79fa34 --- /dev/null +++ b/ZertoApiWrapper/Public/Get-ZAProtectedVmReport.ps1 @@ -0,0 +1,31 @@ +<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #> +function Get-ZAProtectedVmReport { + [cmdletbinding()] + param( + [Parameter( + ParameterSetName = "GenerateReport", + Mandatory, + HelpMessage = "A list of VM identifiers to include in the report." + )] + [string[]]$VMIdentifier + ) + + Begin { + + } + + Process { + $BaseUri = "monitoring/protected-vms" + $Body = @{ + vmsIdentifiers = $VMIdentifier + } + $reportId = Invoke-ZARestRequest -uri $BaseUri -method POST -body ($Body | ConvertTo-Json) + Start-Sleep 1 + $Uri = "{0}?reportId={1}" -f $BaseUri, $reportId.reportId + Invoke-ZARestRequest -uri $Uri + } + + End { + + } +} From b00ededc7fcf538845f874774af9a1b7fda4943f Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 2 Apr 2020 16:44:08 -0400 Subject: [PATCH 17/29] Create Get-ZAProtectedVm.md --- docs/Get-ZAProtectedVm.md | 120 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 docs/Get-ZAProtectedVm.md diff --git a/docs/Get-ZAProtectedVm.md b/docs/Get-ZAProtectedVm.md new file mode 100644 index 0000000..3f4d353 --- /dev/null +++ b/docs/Get-ZAProtectedVm.md @@ -0,0 +1,120 @@ +--- +external help file: ZertoApiWrapper-help.xml +Module Name: ZertoApiWrapper +online version: +schema: 2.0.0 +--- + +# Get-ZAProtectedVm + +## SYNOPSIS +Gets information about currently protected Virtual Machines in all sites. If desired a subset of VMs can be returned by providing VM Identifiers for each virtual machine. + +## SYNTAX + +### AllVMs (Default) +``` +Get-ZAProtectedVm [-AllVms] [] +``` + +### IndividualVMs +``` +Get-ZAProtectedVm -VMIdentifier [-Volumes] [] +``` + +## DESCRIPTION +Gets information about currently protected Virtual Machines in all sites. If desired a subset of VMs can be returned by providing VM Identifiers for each virtual machine. Finally, when gathering information for individual virtual machines, the `-Volumes` parameter can be specified to return volume information for the protected VM. + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> Get-ZAProtectedVm +``` + +Returns all protected virtual machines across all sites. + +### Example 2 +```powershell +PS C:\> Get-ZAProtectedVm -AllVMs +``` + +Returns all protected virtual machines across all sites. + +### Example 3 +```powershell +PS C:\> Get-ZAProtectedVm -VMIdentifier '09914-12345-12341235', '81238-12532-12355332' +``` + +Returns information for only the two specified virtual machines + +### Example 4 +```powershell +PS C:\> Get-ZAProtectedVm -VMIdentifier '09914-12345-12341235', '81238-12532-12355332' -Volumes +``` + +Returns volume information for the two specified virtual machines + +## PARAMETERS + +### -AllVms +Use this switch when you want a list of all protected VMs. +Please be warned this list can be quite large. + +```yaml +Type: SwitchParameter +Parameter Sets: AllVMs +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VMIdentifier +A list of VM identifiers to query + +```yaml +Type: String[] +Parameter Sets: IndividualVMs +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Volumes +Specify this switch when you would like protected vms' volume information returned + +```yaml +Type: SwitchParameter +Parameter Sets: IndividualVMs +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. +For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS +[Zerto Analytics Protected VMs API Endpoint - AllVMs](https://docs.api.zerto.com/#/Monitoring/get_v2_monitoring_protected_vms) +[Zerto Analytics Protected VMs API Endpoint - List of VMs](https://docs.api.zerto.com/#/Monitoring/get_v2_monitoring_protected_vms__vmIdentifier_) +[Zerto Analytics Protected VMs API Endpoint - Volumes of VMs](https://docs.api.zerto.com/#/Monitoring/get_v2_monitoring_protected_vms__vmIdentifier__volumes) + From 2fef1dbc428faf20441f43d674a48d0b79511dd7 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 2 Apr 2020 16:46:59 -0400 Subject: [PATCH 18/29] Create Get-ZAProtectedVmReport.md --- docs/Get-ZAProtectedVmReport.md | 60 +++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 docs/Get-ZAProtectedVmReport.md diff --git a/docs/Get-ZAProtectedVmReport.md b/docs/Get-ZAProtectedVmReport.md new file mode 100644 index 0000000..777fcea --- /dev/null +++ b/docs/Get-ZAProtectedVmReport.md @@ -0,0 +1,60 @@ +--- +external help file: ZertoApiWrapper-help.xml +Module Name: ZertoApiWrapper +online version: +schema: 2.0.0 +--- + +# Get-ZAProtectedVmReport + +## SYNOPSIS +Creates a report of the requested protected virtual machines' volumes. + +## SYNTAX + +``` +Get-ZAProtectedVmReport -VMIdentifier [] +``` + +## DESCRIPTION +Creates a report of the requested protected virtual machines' volumes. + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> Get-ZAProtectedVmReport -VMIdentifier '09914-12345-12341235', '81238-12532-12355332' +``` + +Generates a protected vm report for the virtual machines with the specified VMIdentifiers. + +## PARAMETERS + +### -VMIdentifier +A list of VM identifiers to include in the report. + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. +For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS +[Zerto Analytics Protected VMs Report API Endpoint - POST](https://docs.api.zerto.com/#/Monitoring/post_v2_monitoring_protected_vms) +[Zerto Analytics Protected VMs Report API Endpoint - GET](https://docs.api.zerto.com/#/Monitoring/get_v2_monitoring_protected_vms_reportId__reportId_) From 1a66d4e64bc08b4c8874d18f958717ea6efffad7 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 2 Apr 2020 17:09:25 -0400 Subject: [PATCH 19/29] Update Get-ZAPlannerStatsReport.md --- docs/Get-ZAPlannerStatsReport.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/Get-ZAPlannerStatsReport.md b/docs/Get-ZAPlannerStatsReport.md index dd57171..c052737 100644 --- a/docs/Get-ZAPlannerStatsReport.md +++ b/docs/Get-ZAPlannerStatsReport.md @@ -8,6 +8,7 @@ schema: 2.0.0 # Get-ZAPlannerStatsReport ## SYNOPSIS +Create a report request for the selected VMs for a specific timeframe, retrieving all stats data for ZCAs, WAN, Journal size and array of VMs avg IOPs, avg throughput and journal size. ## SYNTAX @@ -17,16 +18,23 @@ Get-ZAPlannerStatsReport [-siteIdentifier] [-recoveryType] [-v ``` ## DESCRIPTION -{{Fill in the Description}} +Create a report request for the selected VMs for a specific timeframe, retrieving all stats data for ZCAs, WAN, Journal size and array of VMs avg IOPs, avg throughput and journal size. ## EXAMPLES ### Example 1 ```powershell -PS C:\> {{ Add example code here }} +PS C:\> Get-ZAPlannerStatsReport -siteIdentifier '0123-45676-09876' -recoveryType vcenter -vmIdentifier 'vmIdentifier01', 'vmIdentifier02' ``` -{{ Add example description here }} +Will get a stats report for the two VMs listed recovering to a vCenter site with a 24 hour journal + +### Example 2 +```powershell +PS C:\> Get-ZAPlannerStatsReport -siteIdentifier '0123-45676-09876' -recoveryType Azure -vmIdentifier 'vmIdentifier01', 'vmIdentifier02' -desiredJournalHistory 72 +``` + +Will get a stats report for the two VMs listed recovering to an Azure site with a 72 hour journal ## PARAMETERS @@ -136,3 +144,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS +[Zerto Analytics Planner Stats API Endpoint - POST](https://docs.api.zerto.com/#/Planner/post_v2_planner_reports_stats) +[Zerto Analytics Planner Stats API Endpoint - GET](https://docs.api.zerto.com/#/Planner/get_v2_planner_reports_stats) From 78e1cdb9810a7a12d2188b29904c984a948cd742 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 2 Apr 2020 17:16:11 -0400 Subject: [PATCH 20/29] Update Get-ZAPlannerWanReport.md --- docs/Get-ZAPlannerWanReport.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/Get-ZAPlannerWanReport.md b/docs/Get-ZAPlannerWanReport.md index bb88176..a9ddb45 100644 --- a/docs/Get-ZAPlannerWanReport.md +++ b/docs/Get-ZAPlannerWanReport.md @@ -8,6 +8,7 @@ schema: 2.0.0 # Get-ZAPlannerWanReport ## SYNOPSIS +Create a report request to retrieve WAN for a specific VMs list, and timeframe. ## SYNTAX @@ -17,16 +18,16 @@ Get-ZAPlannerWanReport [-siteIdentifier] [-recoveryType] [-vmI ``` ## DESCRIPTION -{{Fill in the Description}} +Create a report request to retrieve WAN for a specific VMs list, and timeframe. ## EXAMPLES ### Example 1 ```powershell -PS C:\> {{ Add example code here }} +PS C:\> Get-ZAPlannerWanReport -siteIdentifier '12345-0987654-254364' -recoveryType vcenter -vmIdentifier '1234-98789-0987', '1234-98789-1252' ``` -{{ Add example description here }} +Get a WAN requirements report for VMs at the protected site. ## PARAMETERS @@ -119,3 +120,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS +[Zerto Analytics Planner Wan Stats API Endpoint - POST](https://docs.api.zerto.com/#/Planner/post_v2_planner_reports_stats_wan) +[Zerto Analytics Planner Wan Stats API Endpoint - GET](https://docs.api.zerto.com/#/Planner/get_v2_planner_reports_stats_wan) From 0ef71c25bbecae300e1d8dcddcc23cfba83bb0ba Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 2 Apr 2020 17:16:14 -0400 Subject: [PATCH 21/29] Update Get-ZAPlannerZcasReport.md --- docs/Get-ZAPlannerZcasReport.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/Get-ZAPlannerZcasReport.md b/docs/Get-ZAPlannerZcasReport.md index 0904caa..bee5805 100644 --- a/docs/Get-ZAPlannerZcasReport.md +++ b/docs/Get-ZAPlannerZcasReport.md @@ -8,6 +8,7 @@ schema: 2.0.0 # Get-ZAPlannerZcasReport ## SYNOPSIS +Create a report request to retrieve ZCAs for a specific VMs list, and timeframe. ## SYNTAX @@ -17,16 +18,16 @@ Get-ZAPlannerZcasReport [-siteIdentifier] [-recoveryType] [-vm ``` ## DESCRIPTION -{{Fill in the Description}} +Create a report request to retrieve ZCAs for a specific VMs list, and timeframe. ## EXAMPLES ### Example 1 ```powershell -PS C:\> {{ Add example code here }} +PS C:\> Get-ZAPlannerZcasReport -siteIdentifier '12345-0987654-254364' -recoveryType azure -vmIdentifier '1234-98789-0987', '1234-98789-1252' ``` -{{ Add example description here }} +Get a report for the number of required ZCA's in Azure to protect the supplied VMs. ## PARAMETERS @@ -119,3 +120,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS +[Zerto Analytics Planner ZCA Stats API Endpoint - POST](https://docs.api.zerto.com/#/Planner/post_v2_planner_reports_stats_zcas) +[Zerto Analytics Planner ZCA Stats API Endpoint - GET](https://docs.api.zerto.com/#/Planner/get_v2_planner_reports_stats_zcas) From 1af70b8c80710ae83fa2edbf92e17d343bf1edf6 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 2 Apr 2020 17:38:35 -0400 Subject: [PATCH 22/29] Create Tests --- .../Get-ZAPlannerJournalSizeReport.Tests.ps1 | 57 +++++++++++++++++++ ...APlannerNetworkPerformanceReport.Tests.ps1 | 57 +++++++++++++++++++ Tests/Public/Get-ZAPlannerSite.Tests.ps1 | 42 ++++++++++++++ .../Public/Get-ZAPlannerStatsReport.Tests.ps1 | 57 +++++++++++++++++++ Tests/Public/Get-ZAPlannerWanReport.Tests.ps1 | 56 ++++++++++++++++++ .../Public/Get-ZAPlannerZcasReport.Tests.ps1 | 57 +++++++++++++++++++ Tests/Public/Get-ZAProtectedVm.Tests.ps1 | 41 +++++++++++++ .../Public/Get-ZAProtectedVmReport.Tests.ps1 | 39 +++++++++++++ 8 files changed, 406 insertions(+) create mode 100644 Tests/Public/Get-ZAPlannerJournalSizeReport.Tests.ps1 create mode 100644 Tests/Public/Get-ZAPlannerNetworkPerformanceReport.Tests.ps1 create mode 100644 Tests/Public/Get-ZAPlannerSite.Tests.ps1 create mode 100644 Tests/Public/Get-ZAPlannerStatsReport.Tests.ps1 create mode 100644 Tests/Public/Get-ZAPlannerWanReport.Tests.ps1 create mode 100644 Tests/Public/Get-ZAPlannerZcasReport.Tests.ps1 create mode 100644 Tests/Public/Get-ZAProtectedVm.Tests.ps1 create mode 100644 Tests/Public/Get-ZAProtectedVmReport.Tests.ps1 diff --git a/Tests/Public/Get-ZAPlannerJournalSizeReport.Tests.ps1 b/Tests/Public/Get-ZAPlannerJournalSizeReport.Tests.ps1 new file mode 100644 index 0000000..e9301e0 --- /dev/null +++ b/Tests/Public/Get-ZAPlannerJournalSizeReport.Tests.ps1 @@ -0,0 +1,57 @@ +#Requires -Modules Pester +$global:here = (Split-Path -Parent $MyInvocation.MyCommand.Path) +$global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[0] + +Describe $global:function -Tag 'Unit', 'Source', 'Built' { + + Context "$global:function::Parameter Unit Tests" { + It "$global:function should have exactly 17 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 17 + } + + $ParameterTestCases = @( + @{ParameterName = 'siteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' } + @{ParameterName = 'vmIdentifier'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' } + @{ParameterName = 'recoveryType'; Type = 'String'; Mandatory = $true; Validation = 'Set' } + @{ParameterName = 'desiredJournalHistory'; Type = 'String'; Mandatory = $true; Validation = 'Range' } + @{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' } + @{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' } + ) + + It " parameter is of type" -TestCases $ParameterTestCases { + param($ParameterName, $Type, $Mandatory, $Validation) + Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type + } + + It " parameter has correct validation setting" -TestCases $ParameterTestCases { + param($ParameterName, $Validation) + Switch ($Validation) { + 'NotNullOrEmpty' { + $attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes + $attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1 + } + + 'Range' { + $attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes + $attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1 + } + + 'Set' { + $attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes + $attrs.Where{ $_ -is [ValidateSet] }.Count | Should -Be 1 + } + + default { + $true | Should be $false -Because "No Validation Selected. Review test cases" + } + } + } + } + + Context "$global:function::Parameter Functional Tests" { + + } +} + +Remove-Variable -Name here -Scope Global +Remove-Variable -Name function -Scope Global diff --git a/Tests/Public/Get-ZAPlannerNetworkPerformanceReport.Tests.ps1 b/Tests/Public/Get-ZAPlannerNetworkPerformanceReport.Tests.ps1 new file mode 100644 index 0000000..5e2b7f6 --- /dev/null +++ b/Tests/Public/Get-ZAPlannerNetworkPerformanceReport.Tests.ps1 @@ -0,0 +1,57 @@ +#Requires -Modules Pester +$global:here = (Split-Path -Parent $MyInvocation.MyCommand.Path) +$global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[0] + +Describe $global:function -Tag 'Unit', 'Source', 'Built' { + + Context "$global:function::Parameter Unit Tests" { + It "$global:function should have exactly 17 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 17 + } + + $ParameterTestCases = @( + @{ParameterName = 'siteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' } + @{ParameterName = 'vmIdentifier'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' } + @{ParameterName = 'recoveryType'; Type = 'String'; Mandatory = $true; Validation = 'Set' } + @{ParameterName = 'interval'; Type = 'Int'; Mandatory = $false; Validation = 'Range' } + @{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' } + @{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' } + ) + + It " parameter is of type" -TestCases $ParameterTestCases { + param($ParameterName, $Type, $Mandatory, $Validation) + Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type + } + + It " parameter has correct validation setting" -TestCases $ParameterTestCases { + param($ParameterName, $Validation) + Switch ($Validation) { + 'NotNullOrEmpty' { + $attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes + $attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1 + } + + 'Range' { + $attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes + $attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1 + } + + 'Set' { + $attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes + $attrs.Where{ $_ -is [ValidateSet] }.Count | Should -Be 1 + } + + default { + $true | Should be $false -Because "No Validation Selected. Review test cases" + } + } + } + } + + Context "$global:function::Parameter Functional Tests" { + + } +} + +Remove-Variable -Name here -Scope Global +Remove-Variable -Name function -Scope Global diff --git a/Tests/Public/Get-ZAPlannerSite.Tests.ps1 b/Tests/Public/Get-ZAPlannerSite.Tests.ps1 new file mode 100644 index 0000000..c12a46f --- /dev/null +++ b/Tests/Public/Get-ZAPlannerSite.Tests.ps1 @@ -0,0 +1,42 @@ +#Requires -Modules Pester +$global:here = (Split-Path -Parent $MyInvocation.MyCommand.Path) +$global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[0] + +Describe $global:function -Tag 'Unit', 'Source', 'Built' { + + Context "$global:function::Parameter Unit Tests" { + It "$global:function should have exactly 12 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 12 + } + + $ParameterTestCases = @( + @{ParameterName = 'siteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' } + ) + + It " parameter is of type" -TestCases $ParameterTestCases { + param($ParameterName, $Type, $Mandatory, $Validation) + Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type + } + + It " parameter has correct validation setting" -TestCases $ParameterTestCases { + param($ParameterName, $Validation) + Switch ($Validation) { + 'NotNullOrEmpty' { + $attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes + $attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1 + } + + default { + $true | Should be $false -Because "No Validation Selected. Review test cases" + } + } + } + } + + Context "$global:function::Parameter Functional Tests" { + + } +} + +Remove-Variable -Name here -Scope Global +Remove-Variable -Name function -Scope Global diff --git a/Tests/Public/Get-ZAPlannerStatsReport.Tests.ps1 b/Tests/Public/Get-ZAPlannerStatsReport.Tests.ps1 new file mode 100644 index 0000000..bed9818 --- /dev/null +++ b/Tests/Public/Get-ZAPlannerStatsReport.Tests.ps1 @@ -0,0 +1,57 @@ +#Requires -Modules Pester +$global:here = (Split-Path -Parent $MyInvocation.MyCommand.Path) +$global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[0] + +Describe $global:function -Tag 'Unit', 'Source', 'Built' { + + Context "$global:function::Parameter Unit Tests" { + It "$global:function should have exactly 17 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 17 + } + + $ParameterTestCases = @( + @{ParameterName = 'siteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' } + @{ParameterName = 'vmIdentifier'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' } + @{ParameterName = 'recoveryType'; Type = 'String'; Mandatory = $true; Validation = 'Set' } + @{ParameterName = 'desiredJournalHistory'; Type = 'Int'; Mandatory = $false; Validation = 'Range' } + @{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' } + @{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' } + ) + + It " parameter is of type" -TestCases $ParameterTestCases { + param($ParameterName, $Type, $Mandatory, $Validation) + Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type + } + + It " parameter has correct validation setting" -TestCases $ParameterTestCases { + param($ParameterName, $Validation) + Switch ($Validation) { + 'NotNullOrEmpty' { + $attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes + $attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1 + } + + 'Range' { + $attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes + $attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1 + } + + 'Set' { + $attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes + $attrs.Where{ $_ -is [ValidateSet] }.Count | Should -Be 1 + } + + default { + $true | Should be $false -Because "No Validation Selected. Review test cases" + } + } + } + } + + Context "$global:function::Parameter Functional Tests" { + + } +} + +Remove-Variable -Name here -Scope Global +Remove-Variable -Name function -Scope Global diff --git a/Tests/Public/Get-ZAPlannerWanReport.Tests.ps1 b/Tests/Public/Get-ZAPlannerWanReport.Tests.ps1 new file mode 100644 index 0000000..238ba22 --- /dev/null +++ b/Tests/Public/Get-ZAPlannerWanReport.Tests.ps1 @@ -0,0 +1,56 @@ +#Requires -Modules Pester +$global:here = (Split-Path -Parent $MyInvocation.MyCommand.Path) +$global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[0] + +Describe $global:function -Tag 'Unit', 'Source', 'Built' { + + Context "$global:function::Parameter Unit Tests" { + It "$global:function should have exactly 14 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 16 + } + + $ParameterTestCases = @( + @{ParameterName = 'siteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' } + @{ParameterName = 'vmIdentifier'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' } + @{ParameterName = 'recoveryType'; Type = 'String'; Mandatory = $true; Validation = 'Set' } + @{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' } + @{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' } + ) + + It " parameter is of type" -TestCases $ParameterTestCases { + param($ParameterName, $Type, $Mandatory, $Validation) + Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type + } + + It " parameter has correct validation setting" -TestCases $ParameterTestCases { + param($ParameterName, $Validation) + Switch ($Validation) { + 'NotNullOrEmpty' { + $attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes + $attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1 + } + + 'Range' { + $attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes + $attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1 + } + + 'Set' { + $attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes + $attrs.Where{ $_ -is [ValidateSet] }.Count | Should -Be 1 + } + + default { + $true | Should be $false -Because "No Validation Selected. Review test cases" + } + } + } + } + + Context "$global:function::Parameter Functional Tests" { + + } +} + +Remove-Variable -Name here -Scope Global +Remove-Variable -Name function -Scope Global diff --git a/Tests/Public/Get-ZAPlannerZcasReport.Tests.ps1 b/Tests/Public/Get-ZAPlannerZcasReport.Tests.ps1 new file mode 100644 index 0000000..bed9818 --- /dev/null +++ b/Tests/Public/Get-ZAPlannerZcasReport.Tests.ps1 @@ -0,0 +1,57 @@ +#Requires -Modules Pester +$global:here = (Split-Path -Parent $MyInvocation.MyCommand.Path) +$global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[0] + +Describe $global:function -Tag 'Unit', 'Source', 'Built' { + + Context "$global:function::Parameter Unit Tests" { + It "$global:function should have exactly 17 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 17 + } + + $ParameterTestCases = @( + @{ParameterName = 'siteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' } + @{ParameterName = 'vmIdentifier'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' } + @{ParameterName = 'recoveryType'; Type = 'String'; Mandatory = $true; Validation = 'Set' } + @{ParameterName = 'desiredJournalHistory'; Type = 'Int'; Mandatory = $false; Validation = 'Range' } + @{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' } + @{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' } + ) + + It " parameter is of type" -TestCases $ParameterTestCases { + param($ParameterName, $Type, $Mandatory, $Validation) + Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type + } + + It " parameter has correct validation setting" -TestCases $ParameterTestCases { + param($ParameterName, $Validation) + Switch ($Validation) { + 'NotNullOrEmpty' { + $attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes + $attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1 + } + + 'Range' { + $attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes + $attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1 + } + + 'Set' { + $attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes + $attrs.Where{ $_ -is [ValidateSet] }.Count | Should -Be 1 + } + + default { + $true | Should be $false -Because "No Validation Selected. Review test cases" + } + } + } + } + + Context "$global:function::Parameter Functional Tests" { + + } +} + +Remove-Variable -Name here -Scope Global +Remove-Variable -Name function -Scope Global diff --git a/Tests/Public/Get-ZAProtectedVm.Tests.ps1 b/Tests/Public/Get-ZAProtectedVm.Tests.ps1 new file mode 100644 index 0000000..89e1e5d --- /dev/null +++ b/Tests/Public/Get-ZAProtectedVm.Tests.ps1 @@ -0,0 +1,41 @@ +#Requires -Modules Pester +$global:here = (Split-Path -Parent $MyInvocation.MyCommand.Path) +$global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[0] + +Describe $global:function -Tag 'Unit', 'Source', 'Built' { + + Context "$global:function::Parameter Unit Tests" { + It "$global:function should have exactly 14 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 14 + } + + $ParameterTestCases = @( + @{ParameterName = 'AllVms'; Type = 'Switch'; Mandatory = $false; Validation = $Null } + @{ParameterName = 'vmIdentifier'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' } + @{ParameterName = 'Volumes'; Type = 'Switch'; Mandatory = $false; Validation = $Null } + ) + + It " parameter is of type" -TestCases $ParameterTestCases { + param($ParameterName, $Type, $Mandatory, $Validation) + Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type + } + + It " parameter has correct validation setting" -TestCases $ParameterTestCases { + param($ParameterName, $Validation) + Switch ($Validation) { + 'NotNullOrEmpty' { + $attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes + $attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1 + } + + } + } + } + + Context "$global:function::Parameter Functional Tests" { + + } +} + +Remove-Variable -Name here -Scope Global +Remove-Variable -Name function -Scope Global diff --git a/Tests/Public/Get-ZAProtectedVmReport.Tests.ps1 b/Tests/Public/Get-ZAProtectedVmReport.Tests.ps1 new file mode 100644 index 0000000..95ad321 --- /dev/null +++ b/Tests/Public/Get-ZAProtectedVmReport.Tests.ps1 @@ -0,0 +1,39 @@ +#Requires -Modules Pester +$global:here = (Split-Path -Parent $MyInvocation.MyCommand.Path) +$global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[0] + +Describe $global:function -Tag 'Unit', 'Source', 'Built' { + + Context "$global:function::Parameter Unit Tests" { + It "$global:function should have exactly 12 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 12 + } + + $ParameterTestCases = @( + @{ParameterName = 'vmIdentifier'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' } + ) + + It " parameter is of type" -TestCases $ParameterTestCases { + param($ParameterName, $Type, $Mandatory, $Validation) + Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type + } + + It " parameter has correct validation setting" -TestCases $ParameterTestCases { + param($ParameterName, $Validation) + Switch ($Validation) { + 'NotNullOrEmpty' { + $attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes + $attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1 + } + + } + } + } + + Context "$global:function::Parameter Functional Tests" { + + } +} + +Remove-Variable -Name here -Scope Global +Remove-Variable -Name function -Scope Global From fbe9fb2af8ba246008cfcfe5a487b691d6e6ad4d Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 2 Apr 2020 17:43:28 -0400 Subject: [PATCH 23/29] Fix Parameter Test --- Tests/Public/Get-ZAPlannerJournalSizeReport.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/Public/Get-ZAPlannerJournalSizeReport.Tests.ps1 b/Tests/Public/Get-ZAPlannerJournalSizeReport.Tests.ps1 index e9301e0..bed9818 100644 --- a/Tests/Public/Get-ZAPlannerJournalSizeReport.Tests.ps1 +++ b/Tests/Public/Get-ZAPlannerJournalSizeReport.Tests.ps1 @@ -13,7 +13,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { @{ParameterName = 'siteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' } @{ParameterName = 'vmIdentifier'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' } @{ParameterName = 'recoveryType'; Type = 'String'; Mandatory = $true; Validation = 'Set' } - @{ParameterName = 'desiredJournalHistory'; Type = 'String'; Mandatory = $true; Validation = 'Range' } + @{ParameterName = 'desiredJournalHistory'; Type = 'Int'; Mandatory = $false; Validation = 'Range' } @{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' } @{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' } ) From 285a82f2805f21bbabd88f8c6abc48b7ffb46b8f Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 2 Apr 2020 17:43:39 -0400 Subject: [PATCH 24/29] Fix Parameter Test --- Tests/Public/Get-ZAPlannerSite.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/Public/Get-ZAPlannerSite.Tests.ps1 b/Tests/Public/Get-ZAPlannerSite.Tests.ps1 index c12a46f..ef63e5c 100644 --- a/Tests/Public/Get-ZAPlannerSite.Tests.ps1 +++ b/Tests/Public/Get-ZAPlannerSite.Tests.ps1 @@ -10,7 +10,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } $ParameterTestCases = @( - @{ParameterName = 'siteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' } + @{ParameterName = 'siteIdentifier'; Type = 'String[]'; Mandatory = $false; Validation = 'NotNullOrEmpty' } ) It " parameter is of type" -TestCases $ParameterTestCases { From 646476e74ecb8d9debb052c38029ea2d03a9b75f Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 2 Apr 2020 17:43:50 -0400 Subject: [PATCH 25/29] Remove unused parameter --- Tests/Public/Get-ZAPlannerZcasReport.Tests.ps1 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Tests/Public/Get-ZAPlannerZcasReport.Tests.ps1 b/Tests/Public/Get-ZAPlannerZcasReport.Tests.ps1 index bed9818..0412e64 100644 --- a/Tests/Public/Get-ZAPlannerZcasReport.Tests.ps1 +++ b/Tests/Public/Get-ZAPlannerZcasReport.Tests.ps1 @@ -5,15 +5,14 @@ $global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { - It "$global:function should have exactly 17 parameters defined" { - (Get-Command $global:function).Parameters.Count | Should -Be 17 + It "$global:function should have exactly 16 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 16 } $ParameterTestCases = @( @{ParameterName = 'siteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' } @{ParameterName = 'vmIdentifier'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' } @{ParameterName = 'recoveryType'; Type = 'String'; Mandatory = $true; Validation = 'Set' } - @{ParameterName = 'desiredJournalHistory'; Type = 'Int'; Mandatory = $false; Validation = 'Range' } @{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' } @{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' } ) From f299aecb9b6e548944be74a639d822c5d54e276f Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 2 Apr 2020 17:44:00 -0400 Subject: [PATCH 26/29] Add parameter validation --- ZertoApiWrapper/Public/Get-ZAProtectedVm.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/ZertoApiWrapper/Public/Get-ZAProtectedVm.ps1 b/ZertoApiWrapper/Public/Get-ZAProtectedVm.ps1 index 8340275..86299ba 100644 --- a/ZertoApiWrapper/Public/Get-ZAProtectedVm.ps1 +++ b/ZertoApiWrapper/Public/Get-ZAProtectedVm.ps1 @@ -12,6 +12,7 @@ function Get-ZAProtectedVm { Mandatory, HelpMessage = "A list of VM identifiers to query" )] + [ValidateNotNullOrEmpty()] [string[]]$VMIdentifier, [Parameter( ParameterSetName = "IndividualVMs", From 0a84246d8ebf421e7e0287f0906e83f7697b321e Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 2 Apr 2020 17:44:16 -0400 Subject: [PATCH 27/29] Add parameter validation --- ZertoApiWrapper/Public/Get-ZAProtectedVmReport.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/ZertoApiWrapper/Public/Get-ZAProtectedVmReport.ps1 b/ZertoApiWrapper/Public/Get-ZAProtectedVmReport.ps1 index b79fa34..c02b0cd 100644 --- a/ZertoApiWrapper/Public/Get-ZAProtectedVmReport.ps1 +++ b/ZertoApiWrapper/Public/Get-ZAProtectedVmReport.ps1 @@ -7,6 +7,7 @@ function Get-ZAProtectedVmReport { Mandatory, HelpMessage = "A list of VM identifiers to include in the report." )] + [ValidateNotNullOrEmpty()] [string[]]$VMIdentifier ) From bc46a512cdac91c8957cbfe2f6c20c5d598073d7 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 2 Apr 2020 17:55:04 -0400 Subject: [PATCH 28/29] Update RELEASENOTES.md --- RELEASENOTES.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index b37c6ad..094cf75 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -11,3 +11,14 @@ * Moved `Invoke-ZertoRestRequest` and `Invoke-ZARestRequest` to be public functions. As there become more and more scenarios where there are not prebuilt functions to accomplish complex specialized tasks, it became apparent that these functions could be leveraged to make the experience and workflow easier. * Updated the `Install-ZertoVra` logic to ensure that the target datastore is available on the target host. There isn't currently any method to validate the target network, but if that becomes available in a later version of the API, the function will be updated. * Updated the `Install-ZertoVra` function to allow for installation of the VRA using the host password method. Please review the [Install-ZertoVra](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Install-ZertoVra.md) documentation for syntax and examples. + +### Zerto Analytics + +* Added several functions for the newly added [Zerto Analytics](https://analytics.zerto.com) Planner. + * `Get-ZAPlannerSite` Help can be found here: [Get-ZAPlannerSite](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAPlannerSite.md) + * `Get-ZAPlannerStatsReport` Help can be found here: [Get-ZAPlannerStatsReport](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAPlannerStatsReport.md) + * `Get-ZAPlannerJournalSizeReport` Help can be found here: [Get-ZAPlannerJournalSizeReport](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAPlannerJournalSizeReport.md) + * `Get-ZAPlannerNetworkPerformanceReport` Help can be found here: [Get-ZAPlannerNetworkPerformanceReport](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAPlannerNetworkPerformanceReport.md) + * `Get-ZAPlannerWanReport` Help can be found here: [Get-ZAPlannerWanReport](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAPlannerWanReport.md) + * `Get-ZAPlannerZcasReport` Help can be found here: [Get-ZAPlannerZcasReport](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAPlannerZcasReport.md) +* Created `Get-ZAProtectedVm` and `Get-ZAProtectedVmReport` functions to leverage the newly released Zerto Analytics APIs for this data. Help files can be found here: [Get-ZAProtectedVm](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAProtectedVm.md) and [Get-ZAProtectedVmReport](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAProtectedVmReport.md) From 86854442ef188829775f0443323407ea8785f1bf Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 2 Apr 2020 17:56:57 -0400 Subject: [PATCH 29/29] Update Online Link to Help --- docs/Get-ZAProtectedVm.md | 2 +- docs/Get-ZAProtectedVmReport.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Get-ZAProtectedVm.md b/docs/Get-ZAProtectedVm.md index 3f4d353..61a97cd 100644 --- a/docs/Get-ZAProtectedVm.md +++ b/docs/Get-ZAProtectedVm.md @@ -1,7 +1,7 @@ --- external help file: ZertoApiWrapper-help.xml Module Name: ZertoApiWrapper -online version: +online version: https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAProtectedVm.md schema: 2.0.0 --- diff --git a/docs/Get-ZAProtectedVmReport.md b/docs/Get-ZAProtectedVmReport.md index 777fcea..c39f2b1 100644 --- a/docs/Get-ZAProtectedVmReport.md +++ b/docs/Get-ZAProtectedVmReport.md @@ -1,7 +1,7 @@ --- external help file: ZertoApiWrapper-help.xml Module Name: ZertoApiWrapper -online version: +online version: https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAProtectedVmReport.md schema: 2.0.0 ---