From ae28fddec2f6c83afb2e1182510fb2fdcdaa6c85 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Tue, 19 Feb 2019 15:53:30 -0500 Subject: [PATCH] Initial Commit to Dedicated Repo --- Functions/Connect-ZertoServer.ps1 | 28 ++ Functions/Disconnect-ZertoServer.ps1 | 7 + Functions/Get-ZertoAlert.ps1 | 71 ++++ Functions/Get-ZertoDatastore.ps1 | 30 ++ Functions/Get-ZertoEvent.ps1 | 79 ++++ Functions/Get-ZertoLicense.ps1 | 5 + Functions/Get-ZertoLocalSite.ps1 | 11 + Functions/Get-ZertoPeerSite.ps1 | 62 +++ Functions/Get-ZertoProtectedVm.ps1 | 60 +++ Functions/Get-ZertoRecoveryReport.ps1 | 43 ++ Functions/Get-ZertoResourcesReport.ps1 | 61 +++ Functions/Get-ZertoServiceProfile.ps1 | 41 ++ Functions/Get-ZertoTask.ps1 | 60 +++ Functions/Get-ZertoUnprotectedVm.ps1 | 5 + Functions/Get-ZertoVirtualizationSite.ps1 | 94 +++++ Functions/Get-ZertoVolume.ps1 | 37 ++ Functions/Get-ZertoVpg.ps1 | 124 ++++++ Functions/Get-ZertoVpgSetting.ps1 | 257 ++++++++++++ Functions/Get-ZertoVras.ps1 | 44 ++ Functions/Get-ZertoZorg.ps1 | 29 ++ Functions/Get-ZsspSession.ps1 | 29 ++ Functions/Invoke-ZertoRestRequest.ps1 | 49 +++ Functions/New-ZertoApiFilter.ps1 | 18 + Help/Connect-ZertoServer.md | 92 +++++ Help/Disconnect-ZertoServer.md | 42 ++ Help/Get-Alerts.md | 269 +++++++++++++ Help/Get-Datastores.md | 67 ++++ Help/Get-Events.md | 330 +++++++++++++++ Help/Get-License.md | 42 ++ Help/Get-LocalSite.md | 61 +++ Help/Get-Peersites.md | 168 ++++++++ Help/Get-ProtectedVMs.md | 224 +++++++++++ Help/Get-RecoveryReport.md | 173 ++++++++ Help/Get-ResourcesReport.md | 311 +++++++++++++++ Help/Get-ServiceProfiles.md | 87 ++++ Help/Get-Tasks.md | 183 +++++++++ Help/Get-UnprotectedVMs.md | 42 ++ Help/Get-VirtualizationSites.md | 277 +++++++++++++ Help/Get-Volumes.md | 128 ++++++ Help/Get-VpgSettings.md | 421 +++++++++++++++++++ Help/Get-Vpgs.md | 466 ++++++++++++++++++++++ Help/Get-Vras.md | 107 +++++ Help/Get-Zorgs.md | 67 ++++ Help/Get-ZsspSessions.md | 67 ++++ Help/Invoke-ZertoRestRequest.md | 152 +++++++ Help/New-ZertoApiFilter.md | 61 +++ Help/ZertoFunctions.md | 82 ++++ Tests/Connect-ZertoServer.Tests.ps1 | 25 ++ 48 files changed, 5188 insertions(+) create mode 100644 Functions/Connect-ZertoServer.ps1 create mode 100644 Functions/Disconnect-ZertoServer.ps1 create mode 100644 Functions/Get-ZertoAlert.ps1 create mode 100644 Functions/Get-ZertoDatastore.ps1 create mode 100644 Functions/Get-ZertoEvent.ps1 create mode 100644 Functions/Get-ZertoLicense.ps1 create mode 100644 Functions/Get-ZertoLocalSite.ps1 create mode 100644 Functions/Get-ZertoPeerSite.ps1 create mode 100644 Functions/Get-ZertoProtectedVm.ps1 create mode 100644 Functions/Get-ZertoRecoveryReport.ps1 create mode 100644 Functions/Get-ZertoResourcesReport.ps1 create mode 100644 Functions/Get-ZertoServiceProfile.ps1 create mode 100644 Functions/Get-ZertoTask.ps1 create mode 100644 Functions/Get-ZertoUnprotectedVm.ps1 create mode 100644 Functions/Get-ZertoVirtualizationSite.ps1 create mode 100644 Functions/Get-ZertoVolume.ps1 create mode 100644 Functions/Get-ZertoVpg.ps1 create mode 100644 Functions/Get-ZertoVpgSetting.ps1 create mode 100644 Functions/Get-ZertoVras.ps1 create mode 100644 Functions/Get-ZertoZorg.ps1 create mode 100644 Functions/Get-ZsspSession.ps1 create mode 100644 Functions/Invoke-ZertoRestRequest.ps1 create mode 100644 Functions/New-ZertoApiFilter.ps1 create mode 100644 Help/Connect-ZertoServer.md create mode 100644 Help/Disconnect-ZertoServer.md create mode 100644 Help/Get-Alerts.md create mode 100644 Help/Get-Datastores.md create mode 100644 Help/Get-Events.md create mode 100644 Help/Get-License.md create mode 100644 Help/Get-LocalSite.md create mode 100644 Help/Get-Peersites.md create mode 100644 Help/Get-ProtectedVMs.md create mode 100644 Help/Get-RecoveryReport.md create mode 100644 Help/Get-ResourcesReport.md create mode 100644 Help/Get-ServiceProfiles.md create mode 100644 Help/Get-Tasks.md create mode 100644 Help/Get-UnprotectedVMs.md create mode 100644 Help/Get-VirtualizationSites.md create mode 100644 Help/Get-Volumes.md create mode 100644 Help/Get-VpgSettings.md create mode 100644 Help/Get-Vpgs.md create mode 100644 Help/Get-Vras.md create mode 100644 Help/Get-Zorgs.md create mode 100644 Help/Get-ZsspSessions.md create mode 100644 Help/Invoke-ZertoRestRequest.md create mode 100644 Help/New-ZertoApiFilter.md create mode 100644 Help/ZertoFunctions.md create mode 100644 Tests/Connect-ZertoServer.Tests.ps1 diff --git a/Functions/Connect-ZertoServer.ps1 b/Functions/Connect-ZertoServer.ps1 new file mode 100644 index 0000000..c9b4921 --- /dev/null +++ b/Functions/Connect-ZertoServer.ps1 @@ -0,0 +1,28 @@ +function Connect-ZertoServer { + [cmdletbinding( + SupportsShouldProcess = $false + )] + param( + [Parameter( + Mandatory = $true, + HelpMessage = "IP address or FQDN of your Zerto Management Server" + )] + [ValidateNotNullOrEmpty()] + [string]$zertoServer, + [string]$zertoPort = "9669", + [Parameter( + Mandatory = $true, + HelpMessage = "Valid credentials to connect to the Zerto Management Server" + )] + [System.Management.Automation.PSCredential] + $credential + ) + $zertoConnectionInformation = @{"zertoServer" = $zertoServer; "zertoPort" = $zertoPort; "LastAction" = $(get-date).Ticks} + Set-Item Env:zertoConnectionInformation -Value ($zertoConnectionInformation | convertto-json -Compress) + $body = '{"AuthenticationMethod": "1"}' + $uri = "session/add" + $results = Invoke-ZertoRestRequest -uri $uri -credential $credential -returnHeaders -body $body -method POST + $zertoAuthorizationHeaders = @{"x-zerto-session" = $results.Headers['x-zerto-session'][0].ToString(); "Accept" = "application/json"} + Set-Item Env:zertoAuthorizationHeaders -Value ($zertoAuthorizationHeaders | convertto-json -Compress) + return $zertoAuthorizationHeaders +} diff --git a/Functions/Disconnect-ZertoServer.ps1 b/Functions/Disconnect-ZertoServer.ps1 new file mode 100644 index 0000000..f4ebc3c --- /dev/null +++ b/Functions/Disconnect-ZertoServer.ps1 @@ -0,0 +1,7 @@ +function Disconnect-ZertoServer { + [cmdletbinding()] + $uri = "session" + Invoke-ZertoRestRequest -uri $uri -method DELETE + Remove-Item Env:zertoAuthorizationHeaders + Remove-Item Env:zertoConnectionInformation +} diff --git a/Functions/Get-ZertoAlert.ps1 b/Functions/Get-ZertoAlert.ps1 new file mode 100644 index 0000000..256c008 --- /dev/null +++ b/Functions/Get-ZertoAlert.ps1 @@ -0,0 +1,71 @@ +function Get-ZertoAlert { + [cmdletbinding( defaultParameterSetName = "main" )] + param( + [Parameter( ParameterSetName = "alertId", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true )] + [string[]]$alertId, + [Parameter( ParameterSetName = "entities", Mandatory = $true )] + [switch]$entities, + [Parameter( ParameterSetName = "helpIdentifiers", Mandatory = $true )] + [switch]$helpIdentifiers, + [Parameter( ParameterSetName = "levels", Mandatory = $true )] + [switch]$levels, + [Parameter( ParameterSetName = "filter" )] + [string]$startDate, + [Parameter( ParameterSetName = "filter" )] + [string]$endDate, + [Parameter( ParameterSetName = "filter" )] + [string]$vpgIdentifier, + [Parameter( ParameterSetName = "filter" )] + [string]$siteIdentifier, + [Parameter( ParameterSetName = "filter" )] + [string]$zorgIdentifier, + [Parameter( ParameterSetName = "filter" )] + [string]$level, + [Parameter( ParameterSetName = "filter" )] + [string]$helpIdentifier, + [Parameter( ParameterSetName = "filter" )] + [string]$entity, + [Parameter( ParameterSetName = "filter" )] + [switch]$isDismissed + ) + + begin { + $baseUri = "alerts" + $returnObject = [System.Collections.ArrayList]@() + } + + process { + switch ( $PSCmdlet.ParameterSetName ) { + "main" { + $uri = "{0}" -f $baseUri + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) | Out-Null + } + + "alertId" { + foreach ( $id in $alertId ) { + $uri = "{0}/{1}" -f $baseUri, $alertId + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) | Out-Null + } + } + + "filter" { + $filter = New-ZertoApiFilter -filterTable $PSBoundParameters + $uri = "{0}{1}" -f $baseUri, $filter + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) | Out-Null + } + + default { + $uri = "{0}/{1}" -f $baseUri, $PSCmdlet.ParameterSetName.ToLower() + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) | Out-Null + } + } + } + + end { + return $returnObject + } +} diff --git a/Functions/Get-ZertoDatastore.ps1 b/Functions/Get-ZertoDatastore.ps1 new file mode 100644 index 0000000..130558d --- /dev/null +++ b/Functions/Get-ZertoDatastore.ps1 @@ -0,0 +1,30 @@ +function Get-ZertoDatastore { + [cmdletbinding( DefaultParameterSetName = "main" )] + param( + [Parameter( ParameterSetName = "datastoreIdentifier" )] + [string[]]$datastoreIdentifier + ) + + begin { + $baseUri = "datastores" + $returnObject = [System.Collections.ArrayList]@() + } + + process { + if ( $PSCmdlet.ParameterSetName -eq "main" ) { + $uri = "{0}" -f $baseUri + $result = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($result) | Out-Null + } else { + foreach ( $id in $datastoreIdentifier ) { + $uri = "{0}/{1}" -f $baseUri, $id + $result = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($result) | Out-Null + } + } + } + + end { + return $returnObject + } +} diff --git a/Functions/Get-ZertoEvent.ps1 b/Functions/Get-ZertoEvent.ps1 new file mode 100644 index 0000000..3e1339c --- /dev/null +++ b/Functions/Get-ZertoEvent.ps1 @@ -0,0 +1,79 @@ +function Get-ZertoEvent { + [cmdletbinding( defaultParameterSetName = "main" )] + param( + [Parameter( ParameterSetName = "filter" )] + [string]$startDate, + [Parameter( ParameterSetName = "filter" )] + [string]$endDate, + [Parameter( ParameterSetName = "filter" )] + [string]$vpg, + [Parameter( ParameterSetName = "filter" )] + [string]$vpgIdentifier, + [Parameter( ParameterSetName = "filter" )] + [string]$eventType, + [Parameter( ParameterSetName = "filter" )] + [string]$siteName, + [Parameter( ParameterSetName = "filter" )] + [string]$siteIdentifier, + [Parameter( ParameterSetName = "filter" )] + [string]$zorgIdentifier, + [Parameter( ParameterSetName = "filter" )] + [string]$entityType, + [Parameter( ParameterSetName = "filter" )] + [string]$userName, + [Parameter( ParameterSetName = "filter" )] + [string]$category, + [Parameter( ParameterSetName = "filter" )] + [string]$eventCategory, + [Parameter( ParameterSetName = "filter" )] + [string]$alertIdentifier, + [Parameter( ParameterSetName = "eventId", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true )] + [string[]]$eventId, + [Parameter( ParameterSetName = "categories", Mandatory = $true )] + [switch]$categories, + [Parameter( ParameterSetName = "entities", Mandatory = $true )] + [switch]$entities, + [Parameter( ParameterSetName = "types", Mandatory = $true )] + [switch]$types + ) + + begin { + $baseUri = "events" + $returnObject = [System.Collections.ArrayList]@() + } + + process { + switch ( $PSCmdlet.ParameterSetName ) { + "main" { + $uri = "{0}" -f $baseUri + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) | Out-Null + } + + "eventId" { + foreach ( $id in $eventId ) { + $uri = "{0}/{1}" -f $baseUri, $id + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) | Out-Null + } + } + + "filter" { + $filter = New-ZertoApiFilter -filterTable $PSBoundParameters + $uri = "{0}{1}" -f $baseUri, $filter + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) | Out-Null + } + + default { + $uri = "{0}/{1}" -f $baseUri, $PSCmdlet.ParameterSetName.ToLower() + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) | Out-Null + } + } + } + + end { + return $returnObject + } +} diff --git a/Functions/Get-ZertoLicense.ps1 b/Functions/Get-ZertoLicense.ps1 new file mode 100644 index 0000000..2fd14d4 --- /dev/null +++ b/Functions/Get-ZertoLicense.ps1 @@ -0,0 +1,5 @@ +function Get-ZertoLicense { + [cmdletbinding()] + $uri = "license" + Invoke-ZertoRestRequest -uri $uri +} diff --git a/Functions/Get-ZertoLocalSite.ps1 b/Functions/Get-ZertoLocalSite.ps1 new file mode 100644 index 0000000..58d4e6c --- /dev/null +++ b/Functions/Get-ZertoLocalSite.ps1 @@ -0,0 +1,11 @@ +function Get-ZertoLocalSite { + [cmdletbinding()] + param( + [switch]$pairingstatuses + ) + $uri = "localsite" + if ($pairingstatuses) { + $uri = "/{0}/pairingstatuses" -f $uri + } + Invoke-ZertoRestRequest -uri $uri +} diff --git a/Functions/Get-ZertoPeerSite.ps1 b/Functions/Get-ZertoPeerSite.ps1 new file mode 100644 index 0000000..f8a4466 --- /dev/null +++ b/Functions/Get-ZertoPeerSite.ps1 @@ -0,0 +1,62 @@ +function Get-ZertoPeerSite { + [cmdletbinding( defaultParameterSetName = "main" )] + param ( + [Parameter ( ParameterSetName = "pairingStatuses", Mandatory = $true )] + [switch]$pairingStatuses, + [Parameter ( ParameterSetName = "siteIdentifier", + Mandatory = $true, + ValueFromPipeline = $true, + ValueFromPipelineByPropertyName = $true )] + [string[]]$siteIdentifier, + [Parameter ( ParameterSetName = "filter" )] + [string]$peerName, + [Parameter ( ParameterSetName = "filter" )] + [string]$paringStatus, + [Parameter ( ParameterSetName = "filter" )] + [string]$location, + [Parameter ( ParameterSetName = "filter" )] + [string]$hostName, + [Parameter ( ParameterSetName = "filter" )] + [string]$port + ) + + begin { + $baseUri = "peersites" + $returnObject = [System.Collections.ArrayList]@() + } + + process { + switch ( $PSCmdlet.ParameterSetName ) { + "main" { + $uri = "{0}" -f $baseUri + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) | Out-Null + } + + "siteIdentifier" { + foreach ( $id in $siteIdentifier ) { + $uri = "{0}/{1}" -f $baseUri, $id + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) | Out-Null + } + } + + "filter" { + $filter = New-ZertoApiFilter -filterTable $PSBoundParameters + $uri = "{0}{1}" -f $baseUri, $filter + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) | Out-Null + } + + default { + $uri = "{0}/{1}" -f $baseUri, $PSCmdlet.ParameterSetName.ToLower() + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) | Out-Null + } + } + } + + end { + return $returnObject + } +} diff --git a/Functions/Get-ZertoProtectedVm.ps1 b/Functions/Get-ZertoProtectedVm.ps1 new file mode 100644 index 0000000..08ab962 --- /dev/null +++ b/Functions/Get-ZertoProtectedVm.ps1 @@ -0,0 +1,60 @@ +function Get-ZertoProtectedVm { + [cmdletbinding( DefaultParameterSetName = "main" )] + param ( + [Parameter( ParameterSetName = "vmIdentifier", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true )] + [string[]]$vmIdentifier, + [Parameter( ParameterSetName = "filter" )] + [string]$vpgName, + [Parameter( ParameterSetName = "filter" )] + [string]$vmName, + [Parameter( ParameterSetName = "filter" )] + [string]$status, + [Parameter( ParameterSetName = "filter" )] + [string]$substatus, + [Parameter( ParameterSetName = "filter" )] + [string]$organizationName, + [Parameter( ParameterSetName = "filter" )] + [string]$priority, + [Parameter( ParameterSetName = "filter" )] + [string]$protectedSiteType, + [Parameter( ParameterSetName = "filter" )] + [string]$recoverySiteType, + [Parameter( ParameterSetName = "filter" )] + [string]$protectedSiteIdentifier, + [Parameter( ParameterSetName = "filter" )] + [string]$recoverySiteIdentifier + ) + + begin { + $baseUri = "vms" + $returnObject = [System.Collections.ArrayList]@() + } + + process { + switch ( $PSCmdlet.ParameterSetName ) { + "main" { + $results = Invoke-ZertoRestRequest -uri $baseUri + $returnObject.Add($results) | Out-Null + } + + "vmIdentifier" { + foreach ( $id in $vmIdentifier ) { + $uri = "{0}/{1}" -f $baseUri, $id + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) + } + } + + "filter" { + $filter = New-ZertoApiFilter -filterTable $PSBoundParameters + $uri = "{0}{1}" -f $baseUri, $filter + $results = New-ZertoRestRequest -uri $uri + $returnObject.Add($results) | Out-Null + } + } + } + + end { + return $returnObject + } +} diff --git a/Functions/Get-ZertoRecoveryReport.ps1 b/Functions/Get-ZertoRecoveryReport.ps1 new file mode 100644 index 0000000..a7a040d --- /dev/null +++ b/Functions/Get-ZertoRecoveryReport.ps1 @@ -0,0 +1,43 @@ +function Get-ZertoRecoveryReport { + [cmdletbinding( DefaultParameterSetName = "main" )] + param( + [Parameter( ParameterSetName = "filter" )] + [string]$startTime, + [Parameter( ParameterSetName = "filter" )] + [string]$endTime, + [Parameter( ParameterSetName = "filter" )] + [string]$pageNumber, + [Parameter( ParameterSetName = "filter" )] + [string]$pageSize, + [Parameter( ParameterSetName = "filter" )] + [string]$vpgIdentifier, + [Parameter( ParameterSetName = "filter" )] + [string]$vpgName, + [Parameter( ParameterSetName = "filter" )] + [string]$recoveryType, + [Parameter( ParameterSetName = "filter" )] + [string]$state + ) + + begin { + $baseUri = "reports/recovery" + } + + process { + switch ( $PSCmdlet.ParameterSetName ) { + "filter" { + $filter = New-ZertoApiFilter -filterTable $PSBoundParameters + $uri = "{0}{1}" -f $baseUri, $filter + $results = New-ZertoRestRequest -uri $uri + } + + default { + $results = Invoke-ZertoRestRequest -uri $baseUri + } + } + } + + end { + return $results + } +} diff --git a/Functions/Get-ZertoResourcesReport.ps1 b/Functions/Get-ZertoResourcesReport.ps1 new file mode 100644 index 0000000..e7ff125 --- /dev/null +++ b/Functions/Get-ZertoResourcesReport.ps1 @@ -0,0 +1,61 @@ +function Get-ZertoResourcesReport { + [cmdletbinding( DefaultParameterSetName = "main" )] + param( + [Parameter( ParameterSetName = "filter" )] + [string]$startTime, + [Parameter( ParameterSetName = "filter" )] + [string]$endTime, + [Parameter( ParameterSetName = "filter" )] + [string]$pageNumber, + [Parameter( ParameterSetName = "filter" )] + [string]$pageSize, + [Parameter( ParameterSetName = "filter" )] + [string]$zorgName, + [Parameter( ParameterSetName = "filter" )] + [string]$vmName, + [Parameter( ParameterSetName = "filter" )] + [string]$vpgName, + [Parameter( ParameterSetName = "filter" )] + [string]$protectedSiteName, + [Parameter( ParameterSetName = "filter" )] + [string]$protectedClusterName, + [Parameter( ParameterSetName = "filter" )] + [string]$protectedHostName, + [Parameter( ParameterSetName = "filter" )] + [string]$protectedOrgVdc, + [Parameter( ParameterSetName = "filter" )] + [string]$protectedVdcOrg, + [Parameter( ParameterSetName = "filter" )] + [string]$recoverySiteName, + [Parameter( ParameterSetName = "filter" )] + [string]$recoveryClusterName, + [Parameter( ParameterSetName = "filter" )] + [string]$recoveryHostName, + [Parameter( ParameterSetName = "filter" )] + [string]$recoveryOrgVdc, + [Parameter( ParameterSetName = "filter" )] + [string]$recoveryVdcOrg + ) + + begin { + $baseUri = "reports/resources" + } + + process { + switch ( $PSCmdlet.ParameterSetName ) { + "filter" { + $filter = New-ZertoApiFilter -filterTable $PSBoundParameters + $uri = "{0}{1}" -f $baseUri, $filter + $results = New-ZertoRestRequest -uri $uri + } + + default { + $results = Invoke-ZertoRestRequest -uri $baseUri + } + } + } + + end { + return $results + } +} diff --git a/Functions/Get-ZertoServiceProfile.ps1 b/Functions/Get-ZertoServiceProfile.ps1 new file mode 100644 index 0000000..71de0c6 --- /dev/null +++ b/Functions/Get-ZertoServiceProfile.ps1 @@ -0,0 +1,41 @@ +function Get-ZertoServiceProfile { + [cmdletbinding( DefaultParameterSetName = "main" )] + param ( + [Parameter( ParameterSetName = "siteIdentifier" )] + [string]$siteIdentifier, + [Parameter( ParameterSetName = "serviceProfileId" )] + [string[]]$serviceProfileId + ) + + begin { + $baseUri = "serviceprofiles" + $returnObject = [System.Collections.ArrayList]@() + } + + process { + switch ( $PSCmdlet.ParameterSetName ) { + "siteIdentifier" { + $uri = "{0}?site={1}" -f $baseUri, $siteIdentifier + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) | Out-Null + } + + "serviceProfileId" { + foreach ( $id in $serviceProfileId ) { + $uri = "{0}/{1}" -f $baseUri, $id + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) + } + } + + default { + $results = Invoke-ZertoRestRequest -uri $baseUri + $returnObject.Add($results) | Out-Null + } + } + } + + end { + return $returnObject + } +} diff --git a/Functions/Get-ZertoTask.ps1 b/Functions/Get-ZertoTask.ps1 new file mode 100644 index 0000000..18d0ee6 --- /dev/null +++ b/Functions/Get-ZertoTask.ps1 @@ -0,0 +1,60 @@ +function Get-ZertoTask { + [cmdletbinding( DefaultParameterSetName = "main" )] + param ( + [Parameter( ParameterSetName = "taskIdentifier" )] + [string[]]$taskIdentifier, + [Parameter( ParameterSetName = "types" )] + [switch]$types, + [Parameter ( ParameterSetName = "filter" )] + [string]$startedBeforeDate, + [Parameter ( ParameterSetName = "filter" )] + [string]$startedAfterDate, + [Parameter ( ParameterSetName = "filter" )] + [string]$completedAfterDate, + [Parameter ( ParameterSetName = "filter" )] + [string]$completedBeforeDate, + [Parameter ( ParameterSetName = "filter" )] + [string]$type, + [Parameter ( ParameterSetName = "filter" )] + [string]$status + ) + + begin { + $baseUri = "tasks" + $returnObject = [System.Collections.ArrayList]@() + } + + process { + switch ( $PSCmdlet.ParameterSetName ) { + "main" { + $results = Invoke-ZertoRestRequest -uri $baseUri + $returnObject.Add($results) | Out-Null + } + + "filter" { + $filter = New-ZertoApiFilter -filterTable $PSBoundParameters + $uri = "{0}{1}" -f $baseUri, $filter + $results = New-ZertoRestRequest -uri $uri + $returnObject.Add($results) | Out-Null + } + + "taskIdentifier" { + foreach ( $id in $taskIdentifier ) { + $uri = "{0}/{1}" -f $baseUri, $id + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) + } + } + + default { + $uri = "{0}/{1}" -f $baseUri, $PSCmdlet.ParameterSetName + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) | Out-Null + } + } + } + + end { + return $returnObject + } +} diff --git a/Functions/Get-ZertoUnprotectedVm.ps1 b/Functions/Get-ZertoUnprotectedVm.ps1 new file mode 100644 index 0000000..b403afc --- /dev/null +++ b/Functions/Get-ZertoUnprotectedVm.ps1 @@ -0,0 +1,5 @@ +function Get-ZertoUnprotectedVm { + [cmdletbinding()] + $uri = "virtualizationsites/{0}/vms" -f $(Get-ZertoLocalSite).siteidentifier + Invoke-ZertoRestRequest -uri $uri +} diff --git a/Functions/Get-ZertoVirtualizationSite.ps1 b/Functions/Get-ZertoVirtualizationSite.ps1 new file mode 100644 index 0000000..7ca40c9 --- /dev/null +++ b/Functions/Get-ZertoVirtualizationSite.ps1 @@ -0,0 +1,94 @@ +function Get-ZertoVirtualizationSite { + [cmdletbinding( DefaultParameterSetName = "main" )] + param( + [Parameter( ParameterSetName = "siteIdentifier", Mandatory = $true )] + [Parameter( ParameterSetName = "datastoreClusters", Mandatory = $true )] + [Parameter( ParameterSetName = "datastores", Mandatory = $true )] + [Parameter( ParameterSetName = "hostClusters", Mandatory = $true )] + [Parameter( ParameterSetName = "hosts", Mandatory = $true )] + [Parameter( ParameterSetName = "networks", Mandatory = $true )] + [Parameter( ParameterSetName = "resourcePools", Mandatory = $true )] + [Parameter( ParameterSetName = "vms", Mandatory = $true )] + [string[]]$siteIdentifiers, + [Parameter( ParameterSetName = "devices", Mandatory = $true )] + [Parameter( ParameterSetName = "folders", Mandatory = $true )] + [string]$siteIdentifier, + [Parameter( ParameterSetName = "datastoreClusters", Mandatory = $true )] + [switch]$datastoreClusters, + [Parameter( ParameterSetName = "datastores", Mandatory = $true )] + [switch]$datastores, + [Parameter( ParameterSetName = "devices", Mandatory = $true )] + [switch]$devices, + [Parameter( ParameterSetName = "devices", Mandatory = $false )] + [Parameter( ParameterSetName = "hosts", Mandatory = $false )] + [string]$hostIdentifier, + [Parameter( ParameterSetName = "folders", Mandatory = $true )] + [switch]$folders, + [Parameter( ParameterSetName = "hostClusters", Mandatory = $true )] + [switch]$hostClusters, + [Parameter( ParameterSetName = "hosts", Mandatory = $true )] + [switch]$hosts, + [Parameter( ParameterSetName = "networks", Mandatory = $true )] + [switch]$networks, + [Parameter( ParameterSetName = "resourcePools", Mandatory = $true )] + [switch]$resourcePools, + [Parameter( ParameterSetName = "vms", Mandatory = $true )] + [switch]$vms + ) + + begin { + $baseUri = "virtualizationsites" + $returnObject = [System.Collections.ArrayList]@() + } + + process { + switch ( $PSCmdlet.ParameterSetName ) { + "main" { + $results = Invoke-ZertoRestRequest -uri $baseUri + $returnObject.Add($results) | Out-Null + } + + "devices" { + foreach ( $id in $siteIdentifier ) { + if ( $PSBoundParameters.Contains( "hostIdentifier" ) ) { + $uri = "{0}/{1}/devices?hostIdentifier={2}" -f $baseUri, $siteIdentifier, $hostIdentifier + } else { + $uri = "{0}/{1}/devices" -f $baseUri, $siteIdentifier + } + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) + } + } + + "hosts" { + if ( $PSBoundParameters.Contains( "hostIdentifier" ) ) { + $uri = "{0}/{1}/hosts/{2}" -f $baseUri, $siteIdentifier, $hostIdentifier + } else { + $uri = "{0}/{1}/hosts" -f $baseUri, $siteIdentifier + } + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) + } + + "siteIdentifier" { + foreach ( $id in $siteIdentifiers ) { + $uri = "{0}/{1}" -f $baseUri, $id + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) + } + } + + default { + foreach ( $id in $siteIdentifiers ) { + $uri = "{0}/{1}/{2}" -f $baseUri, $siteIdentifier, $PSCmdlet.ParameterSetName.ToLower() + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) + } + } + } + } + + end { + return $returnObject + } +} diff --git a/Functions/Get-ZertoVolume.ps1 b/Functions/Get-ZertoVolume.ps1 new file mode 100644 index 0000000..e8c3e70 --- /dev/null +++ b/Functions/Get-ZertoVolume.ps1 @@ -0,0 +1,37 @@ +function Get-ZertoVolume { + [cmdletbinding( DefaultParameterSetName = "main" )] + param( + [Parameter( ParameterSetName = "filter" )] + [string]$volumeType, + [Parameter( ParameterSetName = "filter" )] + [string]$vpgIdentifier, + [Parameter( ParameterSetName = "filter" )] + [string]$datastoreIdentifier, + [Parameter( ParameterSetName = "filter" )] + [string]$protectedVmIdentifier, + [Parameter( ParameterSetName = "filter" )] + [string]$owningVmIdentifier + ) + + begin { + $baseUri = "volumes" + } + + process { + switch ( $PSCmdlet.ParameterSetName ) { + "filter" { + $filter = New-ZertoApiFilter -filterTable $PSBoundParameters + $uri = "{0}{1}" -f $baseUri, $filter + $results = Invoke-ZertoRestRequest -uri $uri + } + + default { + $results = Invoke-ZertoRestRequest -uri $baseUri + } + } + } + + end { + return $results + } +} diff --git a/Functions/Get-ZertoVpg.ps1 b/Functions/Get-ZertoVpg.ps1 new file mode 100644 index 0000000..b2dcb72 --- /dev/null +++ b/Functions/Get-ZertoVpg.ps1 @@ -0,0 +1,124 @@ +function Get-ZertoVpg { + [cmdletbinding( DefaultParameterSetName = "main" )] + param( + [Parameter( ParameterSetName = "protectionGroupIdentifier", Mandatory = $true )] + [Parameter( ParameterSetName = "checkpoints", Mandatory = $true )] + [Parameter( ParameterSetName = "stats", Mandatory = $true )] + [string[]]$protectionGroupIdentifier, + [Parameter( ParameterSetName = "checkpoints", Mandatory = $true )] + [switch]$checkpoints, + [Parameter ( ParameterSetName = "checkpoints")] + [string]$startDate, + [Parameter ( ParameterSetName = "checkpoints")] + [string]$endDate, + [Parameter( ParameterSetName = "stats", Mandatory = $true )] + [switch]$checkpointsStats, + [Parameter( ParameterSetName = "entityTypes", Mandatory = $true )] + [switch]$entityTypes, + [Parameter( ParameterSetName = "failoverCommitPolicies", Mandatory = $true )] + [switch]$failoverCommitPolicies, + [Parameter( ParameterSetName = "failoverShutdownPolicies", Mandatory = $true )] + [switch]$failoverShutdownPolicies, + [Parameter( ParameterSetName = "priorities", Mandatory = $true )] + [switch]$priorities, + [Parameter( ParameterSetName = "retentionPolicies", Mandatory = $true )] + [switch]$retentionPolicies, + [Parameter( ParameterSetName = "statuses", Mandatory = $true )] + [switch]$statuses, + [Parameter( ParameterSetName = "subStatuses", Mandatory = $true )] + [switch]$subStatuses, + [Parameter( ParameterSetName = "filter" )] + [string]$name, + [Parameter( ParameterSetName = "filter" )] + [string]$status, + [Parameter( ParameterSetName = "filter" )] + [string]$subStatus, + [Parameter( ParameterSetName = "filter" )] + [string]$protectedSiteType, + [Parameter( ParameterSetName = "filter" )] + [string]$recoverySiteType, + [Parameter( ParameterSetName = "filter" )] + [string]$protectedSiteIdentifier, + [Parameter( ParameterSetName = "filter" )] + [string]$recoverySiteIdentifier, + [Parameter( ParameterSetName = "filter" )] + [string]$organizationName, + [Parameter( ParameterSetName = "filter" )] + [string]$zorgIdentifier, + [Parameter( ParameterSetName = "filter" )] + [string]$priority, + [Parameter( ParameterSetName = "filter" )] + [string]$serviceProfileIdentifier, + [Parameter( ParameterSetName = "filter" )] + [string]$backupEnabled + ) + begin { + $baseUri = "vpgs" + $returnObject = [System.Collections.ArrayList]@() + } + + Process { + switch ( $PSCmdlet.ParameterSetName ) { + "main" { + $results = Invoke-ZertoRestRequest -uri $baseUri + $returnObject.Add($results) | Out-Null + } + + "protectionGroupIdentifier" { + foreach ( $vpgId in $protectionGroupIdentifier ) { + $uri = "{0}/{1}" -f $baseUri, $vpgId + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) + } + } + + "checkpoints" { + $filter = $false + if ( $PSBoundParameters.Contains("startDate") -or $PSBoundParameters.Contains("endDate") ) { + $filter = $true + $filterTable = @{} + foreach ( $key in $PSBoundParameters.Keys ) { + if ( $key -eq "startDate" -or $key -eq "endDate") { + $filterTable[$key] = $PSBoundParameters[$key] + } + } + $filter = New-ZertoApiFilter -filterTable $filterTable + } + foreach ( $id in $protectionGroupIdentifier ) { + if ( $filter ) { + $uri = "{0}/{1}/checkpoints{2}" -f $baseUri, $id, $filter + } else { + $uri = "{0}/{1}/checkpoints" -f $baseUri, $id + } + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) + } + } + + "stats" { + foreach ( $id in $protectionGroupIdentifier ) { + $uri = "{0}/{1}/checkpoints/stats" -f $baseUri, $id + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) + } + } + + "filter" { + $filter = New-ZertoApiFilter -filterTable $PSBoundParameters + $uri = "{0}{1}" -f $baseUri, $filter + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) + } + + default { + $uri = "{0}/{1}" -f $baseUri, $PSCmdlet.ParameterSetName.ToLower() + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) + } + } + } + + End { + return $returnObject + } +} diff --git a/Functions/Get-ZertoVpgSetting.ps1 b/Functions/Get-ZertoVpgSetting.ps1 new file mode 100644 index 0000000..dade4b6 --- /dev/null +++ b/Functions/Get-ZertoVpgSetting.ps1 @@ -0,0 +1,257 @@ +function Get-ZertoVpgSetting { + [cmdletbinding( + DefaultParameterSetName = "default", + SupportsShouldProcess = $false + )] + param( + [Parameter( + ParameterSetName = "vpgSettingsIdentifier", + ValueFromPipeline = $true, + ValueFromPipelineByPropertyName = $true, + Mandatory = $true + )] + [Parameter( + ParameterSetName = "backup", + ValueFromPipeline = $true, + ValueFromPipelineByPropertyName = $true, + Mandatory = $true + )] + [Parameter( + ParameterSetName = "dayOfWeek", + ValueFromPipeline = $true, + ValueFromPipelineByPropertyName = $true, + Mandatory = $true + )] + [Parameter( + ParameterSetName = "retentionPeriod", + ValueFromPipeline = $true, + ValueFromPipelineByPropertyName = $true, + Mandatory = $true + )] + [Parameter( + ParameterSetName = "schedulerPeriod", + ValueFromPipeline = $true, + ValueFromPipelineByPropertyName = $true, + Mandatory = $true + )] + [Parameter( + ParameterSetName = "basic", + ValueFromPipeline = $true, + ValueFromPipelineByPropertyName = $true, + Mandatory = $true + )] + [Parameter( + ParameterSetName = "bootGroup", + ValueFromPipeline = $true, + ValueFromRemainingArguments = $true, + Mandatory = $true + )] + [Parameter( + ParameterSetName = "journal", + ValueFromPipeline = $true, + ValueFromRemainingArguments = $true, + Mandatory = $true + )] + [Parameter( + ParameterSetName = "networks", + ValueFromPipeline = $true, + ValueFromRemainingArguments = $true, + Mandatory = $true + )] + [Parameter( + ParameterSetName = "priority", + ValueFromPipeline = $true, + ValueFromRemainingArguments = $true, + Mandatory = $true + )] + [Parameter( + ParameterSetName = "recovery", + ValueFromPipeline = $true, + ValueFromRemainingArguments = $true, + Mandatory = $true + )] + [Parameter( + ParameterSetName = "scripting", + ValueFromPipeline = $true, + ValueFromRemainingArguments = $true, + Mandatory = $true + )] + [Parameter( + ParameterSetName = "vms", + ValueFromPipeline = $true, + ValueFromRemainingArguments = $true, + Mandatory = $true + )] + [Parameter( + ParameterSetName = "vmIdentifier", + ValueFromPipeline = $true, + ValueFromRemainingArguments = $true, + Mandatory = $true + )] + [Parameter( + ParameterSetName = "nics", + ValueFromPipeline = $true, + ValueFromRemainingArguments = $true, + Mandatory = $true + )] + [Parameter( + ParameterSetName = "nicIdentifier", + ValueFromPipeline = $true, + ValueFromRemainingArguments = $true, + Mandatory = $true + )] + [Parameter( + ParameterSetName = "volumes", + ValueFromPipeline = $true, + ValueFromRemainingArguments = $true, + Mandatory = $true + )] + [Parameter( + ParameterSetName = "volumeIdentifier", + ValueFromPipeline = $true, + ValueFromRemainingArguments = $true, + Mandatory = $true + )] + [string]$vpgSettingsIdentifier, + [Parameter( + ParameterSetName = "backup", + Mandatory = $true + )] + [switch]$backup, + [Parameter( + ParameterSetName = "dayOfWeek", + Mandatory = $true + )] + [switch]$dayOfWeek, + [Parameter( + ParameterSetName = "retentionPeriod", + Mandatory = $true + )] + [switch]$retentionPeriod, + [Parameter( + ParameterSetName = "schedulerPeriod", + Mandatory = $true + )] + [switch]$schedulerPeriod, + [Parameter( + ParameterSetName = "basic", + Mandatory = $true + )] + [switch]$basic, + [Parameter( + ParameterSetName = "bootGroup", + Mandatory = $true + )] + [switch]$bootgroup, + [Parameter( + ParameterSetName = "journal", + Mandatory = $true + )] + [switch]$journal, + [Parameter( + ParameterSetName = "networks", + Mandatory = $true + )] + [switch]$networks, + [Parameter( + ParameterSetName = "priority", + Mandatory = $true + )] + [switch]$priority, + [Parameter( + ParameterSetName = "recovery", + Mandatory = $true + )] + [switch]$rcovery, + [Parameter( + ParameterSetName = "scripting", + Mandatory = $true + )] + [switch]$scripting, + [Parameter( + ParameterSetName = "vms", + Mandatory = $true )] + [switch]$vms, + [Parameter( + ParameterSetName = "vmIdentifier", + Mandatory = $true + )] + [Parameter( + ParameterSetName = "nics", + Mandatory = $true + )] + [Parameter( + ParameterSetName = "volumes", + Mandatory = $true + )] + [Parameter( + ParameterSetName = "nicIdentifier", + Mandatory = $true + )] + [Parameter( + ParameterSetName = "volumeIdentifier", + Mandatory = $true + )] + [string]$vmIdentifier, + [Parameter( + ParameterSetName = "nics", + Mandatory = $true + )] + [switch]$nics, + [Parameter( + ParameterSetName = "nicIdentifier", + Mandatory = $true + )] + [string]$nicIdentifier, + [Parameter( + ParameterSetName = "volumes", + Mandatory = $true + )] + [switch]$volumes, + [Parameter( + ParameterSetName = "volumeIdentifier", + Mandatory = $true + )] + [string]$volumeIdentifier<#, + [Parameter( + ParameterSetName = "vpgSettingsIdentifier", + Mandatory = $true + )] + [switch]$allSettings #> + ) + + begin { + $baseUri = "vpgSettings" + } + + process { + if ( $PSCmdlet.ParameterSetName -eq "default" ) { + $results = Invoke-ZertoRestRequest -uri $baseUri + } elseif ($PSCmdlet.ParameterSetName -eq "vpgSettingsIdentifier") { + $uri = "{0}/{1}" -f $baseUri, $vpgSettingsIdentifier + $results = Invoke-ZertoRestRequest -uri $uri + } elseif ( $PSCmdlet.ParameterSetName -eq "dayOfWeek" -or $PSCmdlet.ParameterSetName -eq "retentionPeriod" -or $PSCmdlet.ParameterSetName -eq "schedulerPeriod" ) { + $uri = "{0}/{1}/backup/{2}" -f $baseUri, $vpgSettingsIdentifier, $PSCmdlet.ParameterSetName.ToLower() + $results = Invoke-ZertoRestRequest -uri $uri + } elseif ( $PSCmdlet.ParameterSetName -eq "nics" -or $PSCmdlet.ParameterSetName -eq "volumes" ) { + $uri = "{0}/{1}/vms/{2}/{3}" -f $baseUri, $vpgSettingsIdentifier, $vmIdentifier, $PSCmdlet.ParameterSetName.ToLower() + $results = Invoke-ZertoRestRequest -uri $uri + } elseif ( $PSCmdlet.ParameterSetName -eq "vmIdentifier" ) { + $uri = "{0}/{1}/vms/{2}" -f $baseUri, $vpgSettingsIdentifier, $vmIdentifier + $results = Invoke-ZertoRestRequest -uri $uri + } elseif ( $PSCmdlet.ParameterSetName -eq "nicIdentifier" ) { + $uri = "{0}/{1}/vms/{2}/nics/{3}" -f $baseUri, $vpgSettingsIdentifier, $vmIdentifier, $nicIdentifier + $results = Invoke-ZertoRestRequest -uri $uri + } elseif ( $PSCmdlet.ParameterSetName -eq "volumeIdentifier" ) { + $uri = "{0}/{1}/vms/{2}/volumes/{3}" -f $baseUri, $vpgSettingsIdentifier, $vmIdentifier, $volumeIdentifier + $results = Invoke-ZertoRestRequest -uri $uri + } else { + $uri = "{0}/{1}/{2}" -f $baseUri, $vpgSettingsIdentifier, $PSCmdlet.ParameterSetName.ToLower() + $results = Invoke-ZertoRestRequest -uri $uri + } + } + + end { + return $results + } +} diff --git a/Functions/Get-ZertoVras.ps1 b/Functions/Get-ZertoVras.ps1 new file mode 100644 index 0000000..291cdc5 --- /dev/null +++ b/Functions/Get-ZertoVras.ps1 @@ -0,0 +1,44 @@ +function Get-ZertoVra { + [cmdletbinding( + DefaultParameterSetName = "Default" + )] + param( + [Parameter( ParameterSetName = "ipConfig" )] + [switch]$ipconfigurationtypes, + [Parameter( ParameterSetName = "Statuses" )] + [switch]$statuses, + [Parameter( ParameterSetName = "vraIdentifier" )] + [string[]]$vraIdentifier + ) + + begin { + $baseUri = "vras" + $returnObject = [System.Collections.ArrayList]@() + } + + process { + if ( $ipconfigurationtypes ) { + $uri = "{0}/ipconfigurationtypes" -f $baseUri + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject = $results + } elseif ( $statuses ) { + $uri = "{0}/statuses" -f $baseUri + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject = $results + } elseif ( $PSCmdlet.ParameterSetName -eq "vraIdentifierifier" ) { + foreach ( $vraId in $vraIdentifier ) { + $uri = "{0}/{1}" -f $baseUri, $vraId + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) + } + } else { + $uri = $baseUri + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject = $results + } + } + + end { + return $returnObject + } +} diff --git a/Functions/Get-ZertoZorg.ps1 b/Functions/Get-ZertoZorg.ps1 new file mode 100644 index 0000000..1b6c94b --- /dev/null +++ b/Functions/Get-ZertoZorg.ps1 @@ -0,0 +1,29 @@ +function Get-ZertoZorg { + [cmdletbinding( DefaultParameterSetName = "default" )] + param( + [Parameter( ParameterSetName = "zorgIdentifier" )] + [string[]]$zorgIdentifier + ) + + begin { + $baseUri = "zorgs" + $returnObject = [System.Collections.ArrayList]@() + } + + process { + if ( $PSCmdlet.ParameterSetName -eq "default" ) { + $results = Invoke-ZertoRestRequest -uri $baseUri + $returnObject.Add($results) + } elseif ( $PSCmdlet.ParameterSetName -eq "zorgIdentifier" ) { + foreach ( $id in $zorgIdentifier ) { + $uri = "{0}/{1}" -f $baseUri, $id + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) + } + } + } + + end { + return $returnObject + } +} diff --git a/Functions/Get-ZsspSession.ps1 b/Functions/Get-ZsspSession.ps1 new file mode 100644 index 0000000..d7e3bc1 --- /dev/null +++ b/Functions/Get-ZsspSession.ps1 @@ -0,0 +1,29 @@ +function Get-ZertoZsspSession { + [cmdletbinding( DefaultParameterSetName = "default" )] + param( + [Parameter( ParameterSetName = "zsspSessionIdentifier" )] + [string[]]$zsspSessionIdentifier + ) + + begin { + $baseUri = "zsspSessionIdentifier" + $returnObject = [System.Collections.ArrayList]@() + } + + process { + if ( $PSCmdlet.ParameterSetName -eq "default" ) { + $results = Invoke-ZertoRestRequest -uri $baseUri + $returnObject.Add($results) + } elseif ( $PSCmdlet.ParameterSetName -eq "zsspSessionIdentifier" ) { + foreach ( $id in $zsspSessionIdentifier ) { + $uri = "{0}/{1}" -f $baseUri, $id + $results = Invoke-ZertoRestRequest -uri $uri + $returnObject.Add($results) + } + } + } + + end { + return $returnObject + } +} diff --git a/Functions/Invoke-ZertoRestRequest.ps1 b/Functions/Invoke-ZertoRestRequest.ps1 new file mode 100644 index 0000000..c7bdf12 --- /dev/null +++ b/Functions/Invoke-ZertoRestRequest.ps1 @@ -0,0 +1,49 @@ +function Invoke-ZertoRestRequest { + [cmdletbinding()] + param( + [string]$method = "GET", + [string]$uri, + [string]$apiVersion = "v1", + [string]$body, + [string]$contentType = "application/json", + [System.Management.Automation.PSCredential] + $credential, + [switch]$returnHeaders + ) + $callerErrorActionPreference = $ErrorActionPreference + if ( Test-Path Env:zertoConnectionInformation ) { + $zertoConnectionInformation = $(Get-Item -Path Env:zertoConnectionInformation).value | ConvertFrom-Json + } else { + Write-Error -Message "Zerto Connection does not Exist. Please run Connect-ZertoServer first to establish a connection" + break + } + if ( Test-Path Env:zertoAuthorizationHeaders ) { + $json = $(Get-Item Env:zertoAuthorizationHeaders).value | ConvertFrom-Json + $headers = @{} + $json.psobject.properties | ForEach-Object { $headers[$_.Name] = $_.Value } + } else { + $headers = $null + } + if ( (Test-Path Env:zertoAuthorizationHeaders) -and $([datetime]$zertoConnectionInformation.lastAction).addMinutes(30) -lt $(get-date) ) { + Write-Error -Message "Authorization Token has Expired or Does not exist in Env variables. Please re-authorize to the Zerto Virtual Manager" + break + } else { + $submittedURI = "https://{0}:{1}/{2}/{3}" -f $zertoConnectionInformation.zertoServer, $zertoConnectionInformation.zertoPort, $apiVersion, $uri + try { + $lastAction = (get-date).Ticks + $apiRequestResults = Invoke-RestMethod -Uri $submittedURI -Headers $headers -Method $method -Body $body -ContentType $contentType -Credential $credential -SkipCertificateCheck -ResponseHeadersVariable responseHeaders -TimeoutSec 100 + $zertoConnectionInformation.lastAction = $lastAction + Set-Item -Path Env:zertoConnectionInformation -Value $($zertoConnectionInformation | ConvertTo-Json -Compress) + } catch { + Write-Error -ErrorRecord $_ -ErrorAction $callerErrorActionPreference + } + if (-not $returnHeaders) { + return $apiRequestResults + } else { + $apiRequestAndHeaderResults = New-Object -TypeName psobject + $apiRequestAndHeaderResults | Add-Member -MemberType NoteProperty -Name "apiRequestResults" -Value $apiRequestResults + $apiRequestAndHeaderResults | Add-Member -MemberType NoteProperty -Name "Headers" -Value $responseHeaders + return $apiRequestAndHeaderResults + } + } +} diff --git a/Functions/New-ZertoApiFilter.ps1 b/Functions/New-ZertoApiFilter.ps1 new file mode 100644 index 0000000..87e3c9a --- /dev/null +++ b/Functions/New-ZertoApiFilter.ps1 @@ -0,0 +1,18 @@ +function New-ZertoApiFilter { + [cmdletbinding()] + param( + [Parameter( Mandatory = $true )] + [hashtable]$filterTable + ) + [string]$returnString = "?" + + foreach ( $key in $filterTable.Keys ) { + if ($returnString.Length -gt 1) { + $returnString = "{0}&{1}={2}" -f $returnString, $key, $filterTable[$key] + } else { + $returnString = "{0}{1}={2}" -f $returnString, $key, $filterTable[$key] + } + } + + return $returnString +} diff --git a/Help/Connect-ZertoServer.md b/Help/Connect-ZertoServer.md new file mode 100644 index 0000000..534fb9f --- /dev/null +++ b/Help/Connect-ZertoServer.md @@ -0,0 +1,92 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# Connect-ZertoServer + +## SYNOPSIS +Connects and authorizes against a Zerto Virtual Manager server. + +## SYNTAX + +``` +Connect-ZertoServer [-zertoServer] [[-zertoPort] ] [-credential] + [] +``` + +## DESCRIPTION +Connects and authorizes against a Zerto Virtual Manager server. This command will set two environmental variables to contain the authorization token along with the Zerto Server IP address, Port information, and last time the token was used. The token will expire after 30 minutes have passed since the last call. + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> Connect-ZertoServer -zertoServer "192.168.1.100" -zertoPort "9669" -credential $credential +``` + +Connects and authorizes against Zerto Virtual Manager server at 192.168.1.100 on port 9669 using a PSCredential object. + +## PARAMETERS + +### -credential +Valid credentials to connect to the Zerto Management Server + +```yaml +Type: PSCredential +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -zertoPort +Port on which the Zerto API is listening. Default port is 9669 + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 1 +Default value: "9669" +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -zertoServer +IP address or FQDN of your Zerto Management Server + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +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 + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/Disconnect-ZertoServer.md b/Help/Disconnect-ZertoServer.md new file mode 100644 index 0000000..543afdb --- /dev/null +++ b/Help/Disconnect-ZertoServer.md @@ -0,0 +1,42 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# Disconnect-ZertoServer + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +``` +Disconnect-ZertoServer +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +## INPUTS + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/Get-Alerts.md b/Help/Get-Alerts.md new file mode 100644 index 0000000..c6075cd --- /dev/null +++ b/Help/Get-Alerts.md @@ -0,0 +1,269 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# Get-Alerts + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +### main (Default) +``` +Get-Alerts [] +``` + +### alertId +``` +Get-Alerts -alertId [] +``` + +### entities +``` +Get-Alerts [-entities] [] +``` + +### helpIdentifiers +``` +Get-Alerts [-helpIdentifiers] [] +``` + +### levels +``` +Get-Alerts [-levels] [] +``` + +### filter +``` +Get-Alerts [-startDate ] [-endDate ] [-vpgIdentifier ] [-siteIdentifier ] + [-zorgIdentifier ] [-level ] [-helpIdentifier ] [-entity ] [-isDismissed] + [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -alertId +{{Fill alertId Description}} + +```yaml +Type: String[] +Parameter Sets: alertId +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -endDate +{{Fill endDate Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -entities +{{Fill entities Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: entities +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -entity +{{Fill entity Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -helpIdentifier +{{Fill helpIdentifier Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -helpIdentifiers +{{Fill helpIdentifiers Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: helpIdentifiers +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -isDismissed +{{Fill isDismissed Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -level +{{Fill level Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -levels +{{Fill levels Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: levels +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -siteIdentifier +{{Fill siteIdentifier Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -startDate +{{Fill startDate Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vpgIdentifier +{{Fill vpgIdentifier Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -zorgIdentifier +{{Fill zorgIdentifier Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +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 + +### System.String[] + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/Get-Datastores.md b/Help/Get-Datastores.md new file mode 100644 index 0000000..366c59d --- /dev/null +++ b/Help/Get-Datastores.md @@ -0,0 +1,67 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# Get-Datastores + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +### main (Default) +``` +Get-Datastores [] +``` + +### datastoreIdentifier +``` +Get-Datastores [-datastoreIdentifier ] [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -datastoreIdentifier +{{Fill datastoreIdentifier Description}} + +```yaml +Type: String[] +Parameter Sets: datastoreIdentifier +Aliases: + +Required: False +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 + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/Get-Events.md b/Help/Get-Events.md new file mode 100644 index 0000000..d2d3cc8 --- /dev/null +++ b/Help/Get-Events.md @@ -0,0 +1,330 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# Get-Events + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +### main (Default) +``` +Get-Events [] +``` + +### filter +``` +Get-Events [-startDate ] [-endDate ] [-vpg ] [-vpgIdentifier ] + [-eventType ] [-siteName ] [-siteIdentifier ] [-zorgIdentifier ] + [-entityType ] [-userName ] [-category ] [-eventCategory ] + [-alertIdentifier ] [] +``` + +### eventId +``` +Get-Events -eventId [] +``` + +### categories +``` +Get-Events [-categories] [] +``` + +### entities +``` +Get-Events [-entities] [] +``` + +### types +``` +Get-Events [-types] [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -alertIdentifier +{{Fill alertIdentifier Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -categories +{{Fill categories Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: categories +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -category +{{Fill category Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -endDate +{{Fill endDate Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -entities +{{Fill entities Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: entities +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -entityType +{{Fill entityType Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -eventCategory +{{Fill eventCategory Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -eventId +{{Fill eventId Description}} + +```yaml +Type: String[] +Parameter Sets: eventId +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -eventType +{{Fill eventType Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -siteIdentifier +{{Fill siteIdentifier Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -siteName +{{Fill siteName Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -startDate +{{Fill startDate Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -types +{{Fill types Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: types +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -userName +{{Fill userName Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vpg +{{Fill vpg Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vpgIdentifier +{{Fill vpgIdentifier Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -zorgIdentifier +{{Fill zorgIdentifier Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +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 + +### System.String[] + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/Get-License.md b/Help/Get-License.md new file mode 100644 index 0000000..0dbd874 --- /dev/null +++ b/Help/Get-License.md @@ -0,0 +1,42 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# Get-License + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +``` +Get-License +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +## INPUTS + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/Get-LocalSite.md b/Help/Get-LocalSite.md new file mode 100644 index 0000000..57e7125 --- /dev/null +++ b/Help/Get-LocalSite.md @@ -0,0 +1,61 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# Get-LocalSite + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +``` +Get-LocalSite [-pairingstatuses] [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -pairingstatuses +{{Fill pairingstatuses Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +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 + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/Get-Peersites.md b/Help/Get-Peersites.md new file mode 100644 index 0000000..383541c --- /dev/null +++ b/Help/Get-Peersites.md @@ -0,0 +1,168 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# Get-Peersites + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +### main (Default) +``` +Get-Peersites [] +``` + +### pairingStatuses +``` +Get-Peersites [-pairingStatuses] [] +``` + +### siteIdentifier +``` +Get-Peersites -siteIdentifier [] +``` + +### filter +``` +Get-Peersites [-peerName ] [-paringStatus ] [-location ] [-hostName ] + [-port ] [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -hostName +{{Fill hostName Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -location +{{Fill location Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -pairingStatuses +{{Fill pairingStatuses Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: pairingStatuses +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -paringStatus +{{Fill paringStatus Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -peerName +{{Fill peerName Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -port +{{Fill port Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -siteIdentifier +{{Fill siteIdentifier Description}} + +```yaml +Type: String[] +Parameter Sets: siteIdentifier +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +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 + +### System.String[] + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/Get-ProtectedVMs.md b/Help/Get-ProtectedVMs.md new file mode 100644 index 0000000..eeae0ec --- /dev/null +++ b/Help/Get-ProtectedVMs.md @@ -0,0 +1,224 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# Get-ProtectedVMs + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +### main (Default) +``` +Get-ProtectedVMs [] +``` + +### vmIdentifier +``` +Get-ProtectedVMs -vmIdentifier [] +``` + +### filter +``` +Get-ProtectedVMs [-vpgName ] [-vmName ] [-status ] [-substatus ] + [-organizationName ] [-priority ] [-protectedSiteType ] [-recoverySiteType ] + [-protectedSiteIdentifier ] [-recoverySiteIdentifier ] [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -organizationName +{{Fill organizationName Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -priority +{{Fill priority Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -protectedSiteIdentifier +{{Fill protectedSiteIdentifier Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -protectedSiteType +{{Fill protectedSiteType Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -recoverySiteIdentifier +{{Fill recoverySiteIdentifier Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -recoverySiteType +{{Fill recoverySiteType Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -status +{{Fill status Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -substatus +{{Fill substatus Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vmIdentifier +{{Fill vmIdentifier Description}} + +```yaml +Type: String[] +Parameter Sets: vmIdentifier +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -vmName +{{Fill vmName Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vpgName +{{Fill vpgName Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +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 + +### System.String[] + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/Get-RecoveryReport.md b/Help/Get-RecoveryReport.md new file mode 100644 index 0000000..3068442 --- /dev/null +++ b/Help/Get-RecoveryReport.md @@ -0,0 +1,173 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# Get-RecoveryReport + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +### main (Default) +``` +Get-RecoveryReport [] +``` + +### filter +``` +Get-RecoveryReport [-startTime ] [-endTime ] [-pageNumber ] [-pageSize ] + [-vpgIdentifier ] [-vpgName ] [-recoveryType ] [-state ] [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -endTime +{{Fill endTime Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -pageNumber +{{Fill pageNumber Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -pageSize +{{Fill pageSize Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -recoveryType +{{Fill recoveryType Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -startTime +{{Fill startTime Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -state +{{Fill state Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vpgIdentifier +{{Fill vpgIdentifier Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vpgName +{{Fill vpgName Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +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 + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/Get-ResourcesReport.md b/Help/Get-ResourcesReport.md new file mode 100644 index 0000000..8cd0adf --- /dev/null +++ b/Help/Get-ResourcesReport.md @@ -0,0 +1,311 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# Get-ResourcesReport + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +### main (Default) +``` +Get-ResourcesReport [] +``` + +### filter +``` +Get-ResourcesReport [-startTime ] [-endTime ] [-pageNumber ] [-pageSize ] + [-zorgName ] [-vmName ] [-vpgName ] [-protectedSiteName ] + [-protectedClusterName ] [-protectedHostName ] [-protectedOrgVdc ] + [-protectedVdcOrg ] [-recoverySiteName ] [-recoveryClusterName ] + [-recoveryHostName ] [-recoveryOrgVdc ] [-recoveryVdcOrg ] [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -endTime +{{Fill endTime Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -pageNumber +{{Fill pageNumber Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -pageSize +{{Fill pageSize Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -protectedClusterName +{{Fill protectedClusterName Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -protectedHostName +{{Fill protectedHostName Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -protectedOrgVdc +{{Fill protectedOrgVdc Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -protectedSiteName +{{Fill protectedSiteName Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -protectedVdcOrg +{{Fill protectedVdcOrg Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -recoveryClusterName +{{Fill recoveryClusterName Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -recoveryHostName +{{Fill recoveryHostName Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -recoveryOrgVdc +{{Fill recoveryOrgVdc Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -recoverySiteName +{{Fill recoverySiteName Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -recoveryVdcOrg +{{Fill recoveryVdcOrg Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -startTime +{{Fill startTime Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vmName +{{Fill vmName Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vpgName +{{Fill vpgName Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -zorgName +{{Fill zorgName Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +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 + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/Get-ServiceProfiles.md b/Help/Get-ServiceProfiles.md new file mode 100644 index 0000000..2ead784 --- /dev/null +++ b/Help/Get-ServiceProfiles.md @@ -0,0 +1,87 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# Get-ServiceProfiles + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +### main (Default) +``` +Get-ServiceProfiles [] +``` + +### siteIdentifier +``` +Get-ServiceProfiles [-siteIdentifier ] [] +``` + +### serviceProfileId +``` +Get-ServiceProfiles [-serviceProfileId ] [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -serviceProfileId +{{Fill serviceProfileId Description}} + +```yaml +Type: String[] +Parameter Sets: serviceProfileId +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -siteIdentifier +{{Fill siteIdentifier Description}} + +```yaml +Type: String +Parameter Sets: siteIdentifier +Aliases: + +Required: False +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 + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/Get-Tasks.md b/Help/Get-Tasks.md new file mode 100644 index 0000000..a52b0a5 --- /dev/null +++ b/Help/Get-Tasks.md @@ -0,0 +1,183 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# Get-Tasks + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +### main (Default) +``` +Get-Tasks [] +``` + +### taskIdentifier +``` +Get-Tasks [-taskIdentifier ] [] +``` + +### types +``` +Get-Tasks [-types] [] +``` + +### filter +``` +Get-Tasks [-startedBeforeDate ] [-startedAfterDate ] [-completedAfterDate ] + [-completedBeforeDate ] [-type ] [-status ] [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -completedAfterDate +{{Fill completedAfterDate Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -completedBeforeDate +{{Fill completedBeforeDate Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -startedAfterDate +{{Fill startedAfterDate Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -startedBeforeDate +{{Fill startedBeforeDate Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -status +{{Fill status Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -taskIdentifier +{{Fill taskIdentifier Description}} + +```yaml +Type: String[] +Parameter Sets: taskIdentifier +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -type +{{Fill type Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -types +{{Fill types Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: types +Aliases: + +Required: False +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 + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/Get-UnprotectedVMs.md b/Help/Get-UnprotectedVMs.md new file mode 100644 index 0000000..0488f4b --- /dev/null +++ b/Help/Get-UnprotectedVMs.md @@ -0,0 +1,42 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# Get-UnprotectedVMs + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +``` +Get-UnprotectedVMs +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +## INPUTS + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/Get-VirtualizationSites.md b/Help/Get-VirtualizationSites.md new file mode 100644 index 0000000..d08c64a --- /dev/null +++ b/Help/Get-VirtualizationSites.md @@ -0,0 +1,277 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# Get-VirtualizationSites + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +### main (Default) +``` +Get-VirtualizationSites [] +``` + +### vms +``` +Get-VirtualizationSites -siteIdentifiers [-vms] [] +``` + +### resourcePools +``` +Get-VirtualizationSites -siteIdentifiers [-resourcePools] [] +``` + +### networks +``` +Get-VirtualizationSites -siteIdentifiers [-networks] [] +``` + +### hosts +``` +Get-VirtualizationSites -siteIdentifiers [-hostIdentifier ] [-hosts] [] +``` + +### hostClusters +``` +Get-VirtualizationSites -siteIdentifiers [-hostClusters] [] +``` + +### datastores +``` +Get-VirtualizationSites -siteIdentifiers [-datastores] [] +``` + +### datastoreClusters +``` +Get-VirtualizationSites -siteIdentifiers [-datastoreClusters] [] +``` + +### siteIdentifier +``` +Get-VirtualizationSites -siteIdentifiers [] +``` + +### folders +``` +Get-VirtualizationSites -siteIdentifier [-folders] [] +``` + +### devices +``` +Get-VirtualizationSites -siteIdentifier [-devices] [-hostIdentifier ] [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -datastoreClusters +{{Fill datastoreClusters Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: datastoreClusters +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -datastores +{{Fill datastores Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: datastores +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -devices +{{Fill devices Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: devices +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -folders +{{Fill folders Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: folders +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -hostClusters +{{Fill hostClusters Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: hostClusters +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -hostIdentifier +{{Fill hostIdentifier Description}} + +```yaml +Type: String +Parameter Sets: hosts, devices +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -hosts +{{Fill hosts Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: hosts +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -networks +{{Fill networks Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: networks +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -resourcePools +{{Fill resourcePools Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: resourcePools +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -siteIdentifier +{{Fill siteIdentifier Description}} + +```yaml +Type: String +Parameter Sets: folders, devices +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -siteIdentifiers +{{Fill siteIdentifiers Description}} + +```yaml +Type: String[] +Parameter Sets: vms, resourcePools, networks, hosts, hostClusters, datastores, datastoreClusters, siteIdentifier +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vms +{{Fill vms Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: vms +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 + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/Get-Volumes.md b/Help/Get-Volumes.md new file mode 100644 index 0000000..d263388 --- /dev/null +++ b/Help/Get-Volumes.md @@ -0,0 +1,128 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# Get-Volumes + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +### main (Default) +``` +Get-Volumes [] +``` + +### filter +``` +Get-Volumes [-volumeType ] [-vpgIdentifier ] [-datastoreIdentifier ] + [-protectedVmIdentifier ] [-owningVmIdentifier ] [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -datastoreIdentifier +{{Fill datastoreIdentifier Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -owningVmIdentifier +{{Fill owningVmIdentifier Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -protectedVmIdentifier +{{Fill protectedVmIdentifier Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -volumeType +{{Fill volumeType Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vpgIdentifier +{{Fill vpgIdentifier Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +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 + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/Get-VpgSettings.md b/Help/Get-VpgSettings.md new file mode 100644 index 0000000..ebed751 --- /dev/null +++ b/Help/Get-VpgSettings.md @@ -0,0 +1,421 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# Get-VpgSettings + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +### default (Default) +``` +Get-VpgSettings [] +``` + +### volumeIdentifier +``` +Get-VpgSettings -vpgSettingsIdentifier -vmIdentifier -volumeIdentifier + [] +``` + +### volumes +``` +Get-VpgSettings -vpgSettingsIdentifier -vmIdentifier [-volumes] [] +``` + +### nicIdentifier +``` +Get-VpgSettings -vpgSettingsIdentifier -vmIdentifier -nicIdentifier + [] +``` + +### nics +``` +Get-VpgSettings -vpgSettingsIdentifier -vmIdentifier [-nics] [] +``` + +### vmIdentifier +``` +Get-VpgSettings -vpgSettingsIdentifier -vmIdentifier [] +``` + +### vms +``` +Get-VpgSettings -vpgSettingsIdentifier [-vms] [] +``` + +### scripting +``` +Get-VpgSettings -vpgSettingsIdentifier [-scripting] [] +``` + +### recovery +``` +Get-VpgSettings -vpgSettingsIdentifier [-rcovery] [] +``` + +### priority +``` +Get-VpgSettings -vpgSettingsIdentifier [-priority] [] +``` + +### networks +``` +Get-VpgSettings -vpgSettingsIdentifier [-networks] [] +``` + +### journal +``` +Get-VpgSettings -vpgSettingsIdentifier [-journal] [] +``` + +### bootGroup +``` +Get-VpgSettings -vpgSettingsIdentifier [-bootgroup] [] +``` + +### basic +``` +Get-VpgSettings -vpgSettingsIdentifier [-basic] [] +``` + +### schedulerPeriod +``` +Get-VpgSettings -vpgSettingsIdentifier [-schedulerPeriod] [] +``` + +### retentionPeriod +``` +Get-VpgSettings -vpgSettingsIdentifier [-retentionPeriod] [] +``` + +### dayOfWeek +``` +Get-VpgSettings -vpgSettingsIdentifier [-dayOfWeek] [] +``` + +### backup +``` +Get-VpgSettings -vpgSettingsIdentifier [-backup] [] +``` + +### vpgSettingsIdentifier +``` +Get-VpgSettings -vpgSettingsIdentifier [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -backup +{{Fill backup Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: backup +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -basic +{{Fill basic Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: basic +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -bootgroup +{{Fill bootgroup Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: bootGroup +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -dayOfWeek +{{Fill dayOfWeek Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: dayOfWeek +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -journal +{{Fill journal Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: journal +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -networks +{{Fill networks Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: networks +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -nicIdentifier +{{Fill nicIdentifier Description}} + +```yaml +Type: String +Parameter Sets: nicIdentifier +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -nics +{{Fill nics Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: nics +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -priority +{{Fill priority Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: priority +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -rcovery +{{Fill rcovery Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: recovery +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -retentionPeriod +{{Fill retentionPeriod Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: retentionPeriod +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -schedulerPeriod +{{Fill schedulerPeriod Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: schedulerPeriod +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -scripting +{{Fill scripting Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: scripting +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vmIdentifier +{{Fill vmIdentifier Description}} + +```yaml +Type: String +Parameter Sets: volumeIdentifier, volumes, nicIdentifier, nics, vmIdentifier +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vms +{{Fill vms Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: vms +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -volumeIdentifier +{{Fill volumeIdentifier Description}} + +```yaml +Type: String +Parameter Sets: volumeIdentifier +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -volumes +{{Fill volumes Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: volumes +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vpgSettingsIdentifier +{{Fill vpgSettingsIdentifier Description}} + +```yaml +Type: String +Parameter Sets: volumeIdentifier, volumes, nicIdentifier, nics, vmIdentifier, vms, scripting, recovery, priority, networks, journal, bootGroup +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +```yaml +Type: String +Parameter Sets: basic, schedulerPeriod, retentionPeriod, dayOfWeek, backup, vpgSettingsIdentifier +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +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 + +### System.String + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/Get-Vpgs.md b/Help/Get-Vpgs.md new file mode 100644 index 0000000..e53dd88 --- /dev/null +++ b/Help/Get-Vpgs.md @@ -0,0 +1,466 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# Get-Vpgs + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +### main (Default) +``` +Get-Vpgs [] +``` + +### stats +``` +Get-Vpgs -protectionGroupIdentifier [-checkpointsStats] [] +``` + +### checkpoints +``` +Get-Vpgs -protectionGroupIdentifier [-checkpoints] [-startDate ] [-endDate ] + [] +``` + +### protectionGroupIdentifier +``` +Get-Vpgs -protectionGroupIdentifier [] +``` + +### entityTypes +``` +Get-Vpgs [-entityTypes] [] +``` + +### failoverCommitPolicies +``` +Get-Vpgs [-failoverCommitPolicies] [] +``` + +### failoverShutdownPolicies +``` +Get-Vpgs [-failoverShutdownPolicies] [] +``` + +### priorities +``` +Get-Vpgs [-priorities] [] +``` + +### retentionPolicies +``` +Get-Vpgs [-retentionPolicies] [] +``` + +### statuses +``` +Get-Vpgs [-statuses] [] +``` + +### subStatuses +``` +Get-Vpgs [-subStatuses] [] +``` + +### filter +``` +Get-Vpgs [-name ] [-status ] [-subStatus ] [-protectedSiteType ] + [-recoverySiteType ] [-protectedSiteIdentifier ] [-recoverySiteIdentifier ] + [-organizationName ] [-zorgIdentifier ] [-priority ] + [-serviceProfileIdentifier ] [-backupEnabled ] [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -backupEnabled +{{Fill backupEnabled Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -checkpoints +{{Fill checkpoints Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: checkpoints +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -checkpointsStats +{{Fill checkpointsStats Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: stats +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -endDate +{{Fill endDate Description}} + +```yaml +Type: String +Parameter Sets: checkpoints +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -entityTypes +{{Fill entityTypes Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: entityTypes +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -failoverCommitPolicies +{{Fill failoverCommitPolicies Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: failoverCommitPolicies +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -failoverShutdownPolicies +{{Fill failoverShutdownPolicies Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: failoverShutdownPolicies +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -name +{{Fill name Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -organizationName +{{Fill organizationName Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -priorities +{{Fill priorities Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: priorities +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -priority +{{Fill priority Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -protectedSiteIdentifier +{{Fill protectedSiteIdentifier Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -protectedSiteType +{{Fill protectedSiteType Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -protectionGroupIdentifier +{{Fill protectionGroupIdentifier Description}} + +```yaml +Type: String[] +Parameter Sets: stats, checkpoints, protectionGroupIdentifier +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -recoverySiteIdentifier +{{Fill recoverySiteIdentifier Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -recoverySiteType +{{Fill recoverySiteType Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -retentionPolicies +{{Fill retentionPolicies Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: retentionPolicies +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -serviceProfileIdentifier +{{Fill serviceProfileIdentifier Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -startDate +{{Fill startDate Description}} + +```yaml +Type: String +Parameter Sets: checkpoints +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -status +{{Fill status Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -statuses +{{Fill statuses Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: statuses +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -subStatus +{{Fill subStatus Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -subStatuses +{{Fill subStatuses Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: subStatuses +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -zorgIdentifier +{{Fill zorgIdentifier Description}} + +```yaml +Type: String +Parameter Sets: filter +Aliases: + +Required: False +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 + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/Get-Vras.md b/Help/Get-Vras.md new file mode 100644 index 0000000..14506b0 --- /dev/null +++ b/Help/Get-Vras.md @@ -0,0 +1,107 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# Get-Vras + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +### Default (Default) +``` +Get-Vras [] +``` + +### ipConfig +``` +Get-Vras [-ipconfigurationtypes] [] +``` + +### Statuses +``` +Get-Vras [-statuses] [] +``` + +### vraIdentifier +``` +Get-Vras [-vraIdentifier ] [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -ipconfigurationtypes +{{Fill ipconfigurationtypes Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: ipConfig +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -statuses +{{Fill statuses Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: Statuses +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vraIdentifier +{{Fill vraIdentifier Description}} + +```yaml +Type: String[] +Parameter Sets: vraIdentifier +Aliases: + +Required: False +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 + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/Get-Zorgs.md b/Help/Get-Zorgs.md new file mode 100644 index 0000000..36fc1ec --- /dev/null +++ b/Help/Get-Zorgs.md @@ -0,0 +1,67 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# Get-Zorgs + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +### default (Default) +``` +Get-Zorgs [] +``` + +### zorgIdentifier +``` +Get-Zorgs [-zorgIdentifier ] [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -zorgIdentifier +{{Fill zorgIdentifier Description}} + +```yaml +Type: String[] +Parameter Sets: zorgIdentifier +Aliases: + +Required: False +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 + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/Get-ZsspSessions.md b/Help/Get-ZsspSessions.md new file mode 100644 index 0000000..7ef9db0 --- /dev/null +++ b/Help/Get-ZsspSessions.md @@ -0,0 +1,67 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# Get-ZsspSessions + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +### default (Default) +``` +Get-ZsspSessions [] +``` + +### zsspSessionIdentifier +``` +Get-ZsspSessions [-zsspSessionIdentifier ] [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -zsspSessionIdentifier +{{Fill zsspSessionIdentifier Description}} + +```yaml +Type: String[] +Parameter Sets: zsspSessionIdentifier +Aliases: + +Required: False +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 + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/Invoke-ZertoRestRequest.md b/Help/Invoke-ZertoRestRequest.md new file mode 100644 index 0000000..c234b5d --- /dev/null +++ b/Help/Invoke-ZertoRestRequest.md @@ -0,0 +1,152 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# Invoke-ZertoRestRequest + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +``` +Invoke-ZertoRestRequest [[-method] ] [[-uri] ] [[-apiVersion] ] [[-body] ] + [[-contentType] ] [[-credential] ] [-returnHeaders] [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -apiVersion +{{Fill apiVersion Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -body +{{Fill body Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -contentType +{{Fill contentType Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -credential +{{Fill credential Description}} + +```yaml +Type: PSCredential +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -method +{{Fill method Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -returnHeaders +{{Fill returnHeaders Description}} + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -uri +{{Fill uri Description}} + +```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 + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/New-ZertoApiFilter.md b/Help/New-ZertoApiFilter.md new file mode 100644 index 0000000..5f550e8 --- /dev/null +++ b/Help/New-ZertoApiFilter.md @@ -0,0 +1,61 @@ +--- +external help file: ZertoFunctions-help.xml +Module Name: ZertoFunctions +online version: +schema: 2.0.0 +--- + +# New-ZertoApiFilter + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +``` +New-ZertoApiFilter [-filterTable] [] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -filterTable +{{Fill filterTable Description}} + +```yaml +Type: Hashtable +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +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 + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/Help/ZertoFunctions.md b/Help/ZertoFunctions.md new file mode 100644 index 0000000..d14ea5d --- /dev/null +++ b/Help/ZertoFunctions.md @@ -0,0 +1,82 @@ +--- +Module Name: ZertoFunctions +Module Guid: 00000000-0000-0000-0000-000000000000 +Download Help Link: {{Please enter FwLink manually}} +Help Version: {{Please enter version of help manually (X.X.X.X) format}} +Locale: en-US +--- + +# ZertoFunctions Module +## Description +{{Manually Enter Description Here}} + +## ZertoFunctions Cmdlets +### [Connect-ZertoServer](Connect-ZertoServer.md) +{{Manually Enter Connect-ZertoServer Description Here}} + +### [Disconnect-ZertoServer](Disconnect-ZertoServer.md) +{{Manually Enter Disconnect-ZertoServer Description Here}} + +### [Get-Alerts](Get-Alerts.md) +{{Manually Enter Get-Alerts Description Here}} + +### [Get-Datastores](Get-Datastores.md) +{{Manually Enter Get-Datastores Description Here}} + +### [Get-Events](Get-Events.md) +{{Manually Enter Get-Events Description Here}} + +### [Get-License](Get-License.md) +{{Manually Enter Get-License Description Here}} + +### [Get-LocalSite](Get-LocalSite.md) +{{Manually Enter Get-LocalSite Description Here}} + +### [Get-Peersites](Get-Peersites.md) +{{Manually Enter Get-Peersites Description Here}} + +### [Get-ProtectedVMs](Get-ProtectedVMs.md) +{{Manually Enter Get-ProtectedVMs Description Here}} + +### [Get-RecoveryReport](Get-RecoveryReport.md) +{{Manually Enter Get-RecoveryReport Description Here}} + +### [Get-ResourcesReport](Get-ResourcesReport.md) +{{Manually Enter Get-ResourcesReport Description Here}} + +### [Get-ServiceProfiles](Get-ServiceProfiles.md) +{{Manually Enter Get-ServiceProfiles Description Here}} + +### [Get-Tasks](Get-Tasks.md) +{{Manually Enter Get-Tasks Description Here}} + +### [Get-UnprotectedVMs](Get-UnprotectedVMs.md) +{{Manually Enter Get-UnprotectedVMs Description Here}} + +### [Get-VirtualizationSites](Get-VirtualizationSites.md) +{{Manually Enter Get-VirtualizationSites Description Here}} + +### [Get-Volumes](Get-Volumes.md) +{{Manually Enter Get-Volumes Description Here}} + +### [Get-Vpgs](Get-Vpgs.md) +{{Manually Enter Get-Vpgs Description Here}} + +### [Get-VpgSettings](Get-VpgSettings.md) +{{Manually Enter Get-VpgSettings Description Here}} + +### [Get-Vras](Get-Vras.md) +{{Manually Enter Get-Vras Description Here}} + +### [Get-Zorgs](Get-Zorgs.md) +{{Manually Enter Get-Zorgs Description Here}} + +### [Get-ZsspSessions](Get-ZsspSessions.md) +{{Manually Enter Get-ZsspSessions Description Here}} + +### [Invoke-ZertoRestRequest](Invoke-ZertoRestRequest.md) +{{Manually Enter Invoke-ZertoRestRequest Description Here}} + +### [New-ZertoApiFilter](New-ZertoApiFilter.md) +{{Manually Enter New-ZertoApiFilter Description Here}} + diff --git a/Tests/Connect-ZertoServer.Tests.ps1 b/Tests/Connect-ZertoServer.Tests.ps1 new file mode 100644 index 0000000..8462c1f --- /dev/null +++ b/Tests/Connect-ZertoServer.Tests.ps1 @@ -0,0 +1,25 @@ +$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.', '.' +. ../$sut +. ../Invoke-ZertoRestRequest.ps1 +. ../Disconnect-ZertoServer.ps1 + +$credential = Import-Clixml -Path C:\ZertoScripts\Creds.xml +$zertoServer = "192.168.222.20" +$zertoPort = "9669" + +Describe "Connect-ZertoServer" { + it "should exist" { + "../Invoke-ZertoRestRequest.ps1" | should exist + } + it "has a function called Connect-ZertoServer" { + get-command Connect-ZertoServer | should be $true + } + Connect-ZertoServer -zertoServer $zertoServer -zertoPort $zertoPort -credential $credential + it "set an Env variable called zertoConnectionInformation" { + Test-Path Env:/zertoConnectionInformation | should be $true + } + it "set an Env variable called zertoAuthorizationHeaders" { + Test-Path Env:/zertoAuthorizationHeaders | should be $true + } + Disconnect-ZertoServer +}