Merge pull request #71 from ZertoPublic/ZA-Planner
Updates for Zerto Analytics
This commit is contained in:
@@ -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.
|
* 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` 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.
|
* 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)
|
||||||
|
|||||||
@@ -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 "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
|
||||||
|
param($ParameterName, $Type, $Mandatory, $Validation)
|
||||||
|
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
|
||||||
|
}
|
||||||
|
|
||||||
|
It "<ParameterName> 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
|
||||||
@@ -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 "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
|
||||||
|
param($ParameterName, $Type, $Mandatory, $Validation)
|
||||||
|
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
|
||||||
|
}
|
||||||
|
|
||||||
|
It "<ParameterName> 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
|
||||||
@@ -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 = $false; Validation = 'NotNullOrEmpty' }
|
||||||
|
)
|
||||||
|
|
||||||
|
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
|
||||||
|
param($ParameterName, $Type, $Mandatory, $Validation)
|
||||||
|
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
|
||||||
|
}
|
||||||
|
|
||||||
|
It "<ParameterName> 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
|
||||||
@@ -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 "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
|
||||||
|
param($ParameterName, $Type, $Mandatory, $Validation)
|
||||||
|
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
|
||||||
|
}
|
||||||
|
|
||||||
|
It "<ParameterName> 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
|
||||||
@@ -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 "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
|
||||||
|
param($ParameterName, $Type, $Mandatory, $Validation)
|
||||||
|
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
|
||||||
|
}
|
||||||
|
|
||||||
|
It "<ParameterName> 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
|
||||||
@@ -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 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 = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
|
||||||
|
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
|
||||||
|
)
|
||||||
|
|
||||||
|
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
|
||||||
|
param($ParameterName, $Type, $Mandatory, $Validation)
|
||||||
|
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
|
||||||
|
}
|
||||||
|
|
||||||
|
It "<ParameterName> 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
|
||||||
@@ -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 "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
|
||||||
|
param($ParameterName, $Type, $Mandatory, $Validation)
|
||||||
|
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
|
||||||
|
}
|
||||||
|
|
||||||
|
It "<ParameterName> 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
|
||||||
@@ -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 "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
|
||||||
|
param($ParameterName, $Type, $Mandatory, $Validation)
|
||||||
|
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
|
||||||
|
}
|
||||||
|
|
||||||
|
It "<ParameterName> 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
|
||||||
@@ -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
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
<# .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 })
|
||||||
|
}
|
||||||
|
$reportId = Invoke-ZARestRequest -uri $uri -method POST -body ($body | ConvertTo-Json)
|
||||||
|
$uri = '{0}?reportId={1}' -f $uri, $reportId.reportId
|
||||||
|
Invoke-ZARestRequest -uri $uri
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
<# .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"
|
||||||
|
)]
|
||||||
|
[ValidateNotNullOrEmpty()]
|
||||||
|
[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 {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<# .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."
|
||||||
|
)]
|
||||||
|
[ValidateNotNullOrEmpty()]
|
||||||
|
[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 {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,163 @@
|
|||||||
|
---
|
||||||
|
external help file: ZertoApiWrapper-help.xml
|
||||||
|
Module Name: ZertoApiWrapper
|
||||||
|
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
|
||||||
|
|
||||||
|
```
|
||||||
|
Get-ZAPlannerJournalSizeReport [-siteIdentifier] <String> [-recoveryType] <String> [-vmIdentifier] <String[]>
|
||||||
|
[[-desiredJournalHistory] <Int32>] [[-startDate] <String>] [[-endDate] <String>] [<CommonParameters>]
|
||||||
|
```
|
||||||
|
|
||||||
|
## DESCRIPTION
|
||||||
|
Create a report request to retrieve the Journal Size for a specific VMs list, and timeframe.
|
||||||
|
|
||||||
|
## EXAMPLES
|
||||||
|
|
||||||
|
### Example 1
|
||||||
|
```powershell
|
||||||
|
PS C:\> Get-ZAPlannerJournalSizeReport -siteIdentifier '1234567890-01923141' -recoveryType VMware -vmIdentifier 'vmIdentifier1', 'vmIdentifier2'
|
||||||
|
```
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
### -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
|
||||||
|
|
||||||
|
[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)
|
||||||
@@ -0,0 +1,158 @@
|
|||||||
|
---
|
||||||
|
external help file: ZertoApiWrapper-help.xml
|
||||||
|
Module Name: ZertoApiWrapper
|
||||||
|
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
|
||||||
|
|
||||||
|
```
|
||||||
|
Get-ZAPlannerNetworkPerformanceReport [-siteIdentifier] <String> [-recoveryType] <String>
|
||||||
|
[-vmIdentifier] <String[]> [[-interval] <Int32>] [[-startDate] <String>] [[-endDate] <String>]
|
||||||
|
[<CommonParameters>]
|
||||||
|
```
|
||||||
|
|
||||||
|
## DESCRIPTION
|
||||||
|
Create a report request to retrieve the Network Performance for a specific VMs list, and timeframe.
|
||||||
|
|
||||||
|
## EXAMPLES
|
||||||
|
|
||||||
|
### Example 1
|
||||||
|
```powershell
|
||||||
|
PS C:\> Get-ZAPlannerNetworkPerformanceReport -siteIdentifier '1234567890-01923141' -recoveryType VMware -vmIdentifier 'vmIdentifier1', 'vmIdentifier2'
|
||||||
|
```
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
### -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
|
||||||
|
|
||||||
|
[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)
|
||||||
|
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
---
|
||||||
|
external help file: ZertoApiWrapper-help.xml
|
||||||
|
Module Name: ZertoApiWrapper
|
||||||
|
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
|
||||||
|
|
||||||
|
```
|
||||||
|
Get-ZAPlannerSite [[-siteIdentifier] <String[]>] [<CommonParameters>]
|
||||||
|
```
|
||||||
|
|
||||||
|
## 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:\> Get-ZAPlannerSite
|
||||||
|
```
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
### -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
|
||||||
|
|
||||||
|
[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_)
|
||||||
@@ -0,0 +1,148 @@
|
|||||||
|
---
|
||||||
|
external help file: ZertoApiWrapper-help.xml
|
||||||
|
Module Name: ZertoApiWrapper
|
||||||
|
online version: https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAPlannerStatsReport.md
|
||||||
|
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
|
||||||
|
|
||||||
|
```
|
||||||
|
Get-ZAPlannerStatsReport [-siteIdentifier] <String> [-recoveryType] <String> [-vmIdentifier] <String[]>
|
||||||
|
[[-desiredJournalHistory] <Int32>] [[-startDate] <String>] [[-endDate] <String>] [<CommonParameters>]
|
||||||
|
```
|
||||||
|
|
||||||
|
## 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:\> Get-ZAPlannerStatsReport -siteIdentifier '0123-45676-09876' -recoveryType vcenter -vmIdentifier 'vmIdentifier01', 'vmIdentifier02'
|
||||||
|
```
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
### -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
|
||||||
|
[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)
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
---
|
||||||
|
external help file: ZertoApiWrapper-help.xml
|
||||||
|
Module Name: ZertoApiWrapper
|
||||||
|
online version: https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAPlannerWanReport.md
|
||||||
|
schema: 2.0.0
|
||||||
|
---
|
||||||
|
|
||||||
|
# Get-ZAPlannerWanReport
|
||||||
|
|
||||||
|
## SYNOPSIS
|
||||||
|
Create a report request to retrieve WAN for a specific VMs list, and timeframe.
|
||||||
|
|
||||||
|
## SYNTAX
|
||||||
|
|
||||||
|
```
|
||||||
|
Get-ZAPlannerWanReport [-siteIdentifier] <String> [-recoveryType] <String> [-vmIdentifier] <String[]>
|
||||||
|
[[-startDate] <String>] [[-endDate] <String>] [<CommonParameters>]
|
||||||
|
```
|
||||||
|
|
||||||
|
## DESCRIPTION
|
||||||
|
Create a report request to retrieve WAN for a specific VMs list, and timeframe.
|
||||||
|
|
||||||
|
## EXAMPLES
|
||||||
|
|
||||||
|
### Example 1
|
||||||
|
```powershell
|
||||||
|
PS C:\> Get-ZAPlannerWanReport -siteIdentifier '12345-0987654-254364' -recoveryType vcenter -vmIdentifier '1234-98789-0987', '1234-98789-1252'
|
||||||
|
```
|
||||||
|
|
||||||
|
Get a WAN requirements report for VMs at the protected site.
|
||||||
|
|
||||||
|
## 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
|
||||||
|
[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)
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
---
|
||||||
|
external help file: ZertoApiWrapper-help.xml
|
||||||
|
Module Name: ZertoApiWrapper
|
||||||
|
online version: https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAPlannerZcasReport.md
|
||||||
|
schema: 2.0.0
|
||||||
|
---
|
||||||
|
|
||||||
|
# Get-ZAPlannerZcasReport
|
||||||
|
|
||||||
|
## SYNOPSIS
|
||||||
|
Create a report request to retrieve ZCAs for a specific VMs list, and timeframe.
|
||||||
|
|
||||||
|
## SYNTAX
|
||||||
|
|
||||||
|
```
|
||||||
|
Get-ZAPlannerZcasReport [-siteIdentifier] <String> [-recoveryType] <String> [-vmIdentifier] <String[]>
|
||||||
|
[[-startDate] <String>] [[-endDate] <String>] [<CommonParameters>]
|
||||||
|
```
|
||||||
|
|
||||||
|
## DESCRIPTION
|
||||||
|
Create a report request to retrieve ZCAs for a specific VMs list, and timeframe.
|
||||||
|
|
||||||
|
## EXAMPLES
|
||||||
|
|
||||||
|
### Example 1
|
||||||
|
```powershell
|
||||||
|
PS C:\> Get-ZAPlannerZcasReport -siteIdentifier '12345-0987654-254364' -recoveryType azure -vmIdentifier '1234-98789-0987', '1234-98789-1252'
|
||||||
|
```
|
||||||
|
|
||||||
|
Get a report for the number of required ZCA's in Azure to protect the supplied VMs.
|
||||||
|
|
||||||
|
## 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
|
||||||
|
[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)
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
---
|
||||||
|
external help file: ZertoApiWrapper-help.xml
|
||||||
|
Module Name: ZertoApiWrapper
|
||||||
|
online version: https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAProtectedVm.md
|
||||||
|
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] [<CommonParameters>]
|
||||||
|
```
|
||||||
|
|
||||||
|
### IndividualVMs
|
||||||
|
```
|
||||||
|
Get-ZAProtectedVm -VMIdentifier <String[]> [-Volumes] [<CommonParameters>]
|
||||||
|
```
|
||||||
|
|
||||||
|
## 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)
|
||||||
|
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
---
|
||||||
|
external help file: ZertoApiWrapper-help.xml
|
||||||
|
Module Name: ZertoApiWrapper
|
||||||
|
online version: https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAProtectedVmReport.md
|
||||||
|
schema: 2.0.0
|
||||||
|
---
|
||||||
|
|
||||||
|
# Get-ZAProtectedVmReport
|
||||||
|
|
||||||
|
## SYNOPSIS
|
||||||
|
Creates a report of the requested protected virtual machines' volumes.
|
||||||
|
|
||||||
|
## SYNTAX
|
||||||
|
|
||||||
|
```
|
||||||
|
Get-ZAProtectedVmReport -VMIdentifier <String[]> [<CommonParameters>]
|
||||||
|
```
|
||||||
|
|
||||||
|
## 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_)
|
||||||
Reference in New Issue
Block a user