exports/ProxyCmdletDefinitions.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Adds SSL certificate check .Description Adds SSL certificate check .Example PS C:\>Add-ZvmSslCheck .Outputs System.Boolean .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/add-zvmsslcheck #> function Add-ZvmSslCheck { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Add', PositionalBinding=$false)] param() begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Add = 'Zerto.Zvm.Commandlets\Add-ZvmSslCheck_Add'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Add session .Description Add session .Example PS C:\>Connect-Zvm –Host MyZVMHost.company.com .Example PS C:\>Connect-Zvm –Host MyZVMHost.company.com Connect-Zvm_Connect: No connection could be made because the target machine actively refused it. (127.0.0.1:9669) .Example PS C:\>Connect-Zvm –Host MyZVMHost.company.com Connect-Zvm_Connect: Failed logging in to 192.168.128.10 with username root. Error was 'Exception running : StandaloneVcLogin' .Example PS C:\>Connect-Zvm –Host MyZVMHost.company.com Connect-Zvm_Connect: Failed logging in to 192.168.128.10 with username root. Error was 'Cannot complete login due to an incorrect user name or password.' .Outputs System.Boolean .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/connect-zvm #> function Connect-Zvm { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Connect', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Position=0, Mandatory)] [Zerto.Zvm.Category('Runtime')] [System.String] # ZVM host/IP ${HostName}, [Parameter(Position=1, Mandatory)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # User credentials ${Credential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials}, [Parameter()] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Int32] # ZVM Port ${Port} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Connect = 'Zerto.Zvm.Commandlets\Connect-Zvm_Connect'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Remove session .Description Remove session .Example PS C:\>Disconnect-Zvm .Example PS C:\>Disconnect-Zvm Disconnect-Zvm_Disconnect: Login to ZVM first. .Outputs System.Boolean .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/disconnect-zvm #> function Disconnect-Zvm { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Disconnect', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Disconnect = 'Zerto.Zvm.Commandlets\Disconnect-Zvm_Disconnect'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Returns the list of acceptable values for alert help identifiers. .Description Returns the list of acceptable values for alert help identifiers. .Example PS C:\>Get-ZvmAlertHelpId AWS0001 ZCA0001 ZCA0002 ZCA0003 BCK0001 BCK0002 BCK0005 BCK0006 BCK0007 LTR0001 .Outputs System.String .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/get-zvmalerthelpid #> function Get-ZvmAlertHelpId { [OutputType([System.String])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'Zerto.Zvm.Commandlets\Get-ZvmAlertHelpId_Get'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Returns the list of acceptable values for alert levels. .Description Returns the list of acceptable values for alert levels. .Example PS C:\>Get-ZvmAlertLevel Warning Error .Outputs System.String .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/get-zvmalertlevel #> function Get-ZvmAlertLevel { [OutputType([System.String])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'Zerto.Zvm.Commandlets\Get-ZvmAlertLevel_Get'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Returns the list of all alerts on the site. .Description Returns the list of all alerts on the site. Note: Parameter 'VpgId' accepts VPG name as well as VPG GUID .Example PS C:\>Get-ZvmAlert HelpIdentifier Level Entity IsDismissed TurnedOn Description -------------- ----- ------ ----------- -------- ----------- VRA0001 Warning Vra False 12/15/2020 9:55:17 AM Host 10.171.65.35 has no VRA installed, and is part of cluster Cluster that contains hosts with installed VRAs. .Example PS C:\>Get-ZvmAlert -Entity Vpg HelpIdentifier Level Entity IsDismissed TurnedOn Description -------------- ----- ------ ----------- -------- ----------- VPG0003 Warning Vpg False 12/7/2020 6:23:54 PM VPG MyVPG01 journal history is less than 75% of the configured 1 day. This has occurred because of a synchronization between the protected and recovery sites and will … VPG0003 Warning Vpg False 12/7/2020 6:23:54 PM VPG MyVPG02 journal history is less than 75% of the configured 1 day. This has occurred because of a synchronization between the protected and recovery sites and will … VPG0003 Warning Vpg False 12/7/2020 6:23:54 PM VPG MyVPG03 journal history is less than 75% of the configured 1 day. This has occurred because of a synchronization between the protected and recovery sites and will automa… .Example PS C:\>Get-ZvmAlert | fl Link.Identifier : d17d4837-4242-4123-bef1-4f2bbbcd46b9 AffectedZorgs.Identifier : AffectedVpgs.Identifier : Site.Identifier : af25ce75-4bc7-43f1-beaf-ed312bf774d3 HelpIdentifier : VRA0028 Level : Warning Entity : Vra IsDismissed : False TurnedOn : 1/8/2021 09:37:03 Description : VRA on host 192.168.128.1 is powered off. Link.Identifier : 01c716e5-54eb-454b-9202-8d9b7225e9ba AffectedZorgs.Identifier : AffectedVpgs.Identifier : Site.Identifier : af25ce75-4bc7-43f1-beaf-ed312bf774d3 HelpIdentifier : VRA0028 Level : Warning Entity : Vra IsDismissed : False TurnedOn : 1/8/2021 09:37:03 Description : VRA on host 192.168.128.2 is powered off. .Example PS C:\>Get-ZvmAlert -AlertId d17d4837-4242-4123-bef1-4f2bbbcd46b9 HelpIdentifier Level Entity IsDismissed TurnedOn Description -------------- ----- ------ ----------- -------- ----------- VRA0028 Warning Vra False 1/8/2021 09:37:03 VRA on host 192.168.128.1 is powered off. .Outputs Zerto.Zvm.Models.IAlertApi .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/get-zvmalert #> function Get-ZvmAlert { [OutputType([Zerto.Zvm.Models.IAlertApi])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get1', Mandatory)] [Zerto.Zvm.Category('Path')] [System.String] # . ${AlertId}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.DateTime] # . ${EndDate}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${Entity}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${HelpId}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.Management.Automation.SwitchParameter] # . ${IsDismissed}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${Level}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${SiteId}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.DateTime] # . ${StartDate}, [Parameter(ParameterSetName='Get', Position=0)] [Zerto.Zvm.Category('Query')] [System.String] # . ${VpgId}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${ZorgId}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'Zerto.Zvm.Commandlets\Get-ZvmAlert_Get'; Get1 = 'Zerto.Zvm.Commandlets\Get-ZvmAlert_Get1'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Returns the list of acceptable values for event types. .Description Returns the list of acceptable values for event types. .Example PS C:\>Get-ZvmEventType CreateProtectionGroup RemoveProtectionGroup FailOver FailOverTest StopFailOverTest Move ProtectVM UnprotectVM InstallVra … .Outputs System.String .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/get-zvmeventtype #> function Get-ZvmEventType { [OutputType([System.String])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'Zerto.Zvm.Commandlets\Get-ZvmEventType_Get'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Returns the list of all events on the site processing the API. Per event, shows summary information. .Description Returns the list of all events on the site processing the API. Per event, shows summary information. Note: Parameter 'VpgId' accepts VPG name as well as VPG GUID .Example PS C:\>Get-ZvmEvent HelpLink EventType ZorgName SiteName Vpgs OccurredOn Description -------- -------------- -------------- -------------- ---- ------------------- ------------------ EV0070 Login Zorg1 site4_QA test_vpg1 12/14/2020 1:41:39 PM ZVM Login. Success. .Example PS C:\>Get-ZvmEvent | fl EventIdentifier : e6ffc5bb-f413-445b-a210-eda3e4787600 OccurredOn : 1/8/2021 10:09:20 Description : ZVM Login. Success. HelpLink : EV0070 EventType : Login EventCategory : Events EntityType : Site ZorgIdentifier : ZorgName : SiteIdentifier : af25ce75-4bc7-43f1-beaf-ed312bf774d3 SiteName : generic-zcloud2_vcd10_local at Zerto UserName : \System Vpgs.VpgIdentifier : Vpgs.VpgName : EventCompletedSuccessfully : True RelatedEntities.Alerts : RelatedEntities.FlrSessions : RelatedEntities.Hosts : RelatedEntities.Sites : af25ce75-4bc7-43f1-beaf-ed312bf774d3 RelatedEntities.Vpgs : RelatedEntities.Zorgs : .Example PS C:\>Get-ZvmEvent -EventId 5eebedea-660b-4c45-9f54-26773981b37f HelpLink EventType ZorgName SiteName Vpgs OccurredOn Description -------- -------------- -------------- -------------- ---- ------------------- ------------------ EV0070 Login Zorg1 site4_QA test_vpg1 12/14/2020 1:41:39 PM ZVM Login. Success. .Outputs Zerto.Zvm.Models.IEventApi .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/get-zvmevent #> function Get-ZvmEvent { [OutputType([Zerto.Zvm.Models.IEventApi])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get1', Mandatory)] [Zerto.Zvm.Category('Path')] [System.String] # . ${EventId}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${AlertId}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${Category}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.DateTime] # . ${EndDate}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${EntityType}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${EventCategory}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${EventType}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${SiteId}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${SiteName}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.DateTime] # . ${StartDate}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${UserName}, [Parameter(ParameterSetName='Get', Position=0)] [Zerto.Zvm.Category('Query')] [System.String] # . ${VpgId}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${VpgName}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${ZorgId}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'Zerto.Zvm.Commandlets\Get-ZvmEvent_Get'; Get1 = 'Zerto.Zvm.Commandlets\Get-ZvmEvent_Get1'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Returns the license details of a ZVM .Description Returns the license details of a ZVM .Example PS C:\>Get-ZvmLicense ExpiryTime LicenseType SiteName MaxVms TotalVmsCount LicenseKey ---------- ----------- -------- ------ ------------- ---------- 2020-12-31 CloudO2M site3_QA_10.171.64.228 1000 6 8LTPJCDEWRYYTN5ASF2HXWMP5P2EU8MFCJ9V .Outputs Zerto.Zvm.Models.ILicenseApi .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/get-zvmlicense #> function Get-ZvmLicense { [OutputType([Zerto.Zvm.Models.ILicenseApi])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'Zerto.Zvm.Commandlets\Get-ZvmLicense_Get'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Returns a local site API .Description Returns a local site API .Example PS C:\>Get-ZvmLocalSite SiteName IPAddress SiteType Version ZVmApiVersion -------------- ----------------- -------------- ----------- --------------------- vSphere-Site01 192.168.1.110 VCenter 8.5.0 1.39.0 .Outputs Zerto.Zvm.Models.ILocalSiteApi .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/get-zvmlocalsite #> function Get-ZvmLocalSite { [OutputType([Zerto.Zvm.Models.ILocalSiteApi])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'Zerto.Zvm.Commandlets\Get-ZvmLocalSite_Get'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Generate token .Description Generate token .Example PS C:\>Get-ZvmPairingToken Token UtcExpirationDate ----- ----------------- NIjkL*************RdLKhCOQzRPn/68wmup+c= 12/09/2020 06:36 PM .Outputs Zerto.Zvm.Models.IPairingTokenResult .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/get-zvmpairingtoken #> function Get-ZvmPairingToken { [OutputType([Zerto.Zvm.Models.IPairingTokenResult])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'Zerto.Zvm.Commandlets\Get-ZvmPairingToken_Get'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Returns the list of all peer sites of the site processing the API. .Description Returns the list of all peer sites of the site processing the API. .Example PS C:\>Get-ZvmPeer PeerSiteName HostName Port SiteType Version PairingStatus UsedStorage -------------- ------------- ----- --------- ------- ------------- ----------- vSphere-Site02 192.168.1.111 9071 VCenter 8.5.0 Paired 3434496 azure-Site 192.168.1.112 9071 Azure 8.5.0 Paired 0 .Outputs Zerto.Zvm.Models.IPeerSiteApi .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/get-zvmpeer #> function Get-ZvmPeer { [OutputType([Zerto.Zvm.Models.IPeerSiteApi])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get1', Position=0, Mandatory)] [Zerto.Zvm.Category('Path')] [System.String] # . ${SiteId}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${HostName}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${Location}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${PairingStatus}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${PeerName}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.Int32] # . ${Port}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'Zerto.Zvm.Commandlets\Get-ZvmPeer_Get'; Get1 = 'Zerto.Zvm.Commandlets\Get-ZvmPeer_Get1'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Returns the list of all tasks running on the site processing the API. .Description Returns the list of all tasks running on the site processing the API. .Example PS C:\>Get-ZvmTask Type Started Completed CompleteReason Progress State IsCancellable TaskIdentifier ---- ------- --------- -------------- -------- ----- ------------- -------------- InsertTaggedCP 12/7/2020 5:08:36 PM 12/7/2020 5:08:37 PM 100 Completed False 390e6b97-597d-4011-b91d-7160b30bf148.587cfbb5-c22c-4880-995f-df5eb2ddc737 .Outputs Zerto.Zvm.Models.ITaskApi .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/get-zvmtask #> function Get-ZvmTask { [OutputType([Zerto.Zvm.Models.ITaskApi])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get1', Position=0, Mandatory)] [Zerto.Zvm.Category('Path')] [System.String] # . ${TaskId}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.DateTime] # . ${CompletedAfterDate}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.DateTime] # . ${CompletedBeforeDate}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.DateTime] # . ${StartedAfterDate}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.DateTime] # . ${StartedBeforeDate}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${Status}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${Type}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'Zerto.Zvm.Commandlets\Get-ZvmTask_Get'; Get1 = 'Zerto.Zvm.Commandlets\Get-ZvmTask_Get1'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Returns the list of datastores for a specified virtualization site. .Description Returns the list of datastores for a specified virtualization site. .Example PS C:\>Get-ZvmVirtualizationSiteDatastore DatastoreIdentifier DatastoreName ------------------- ------------- 840f99fb-4689-2f8b-ea10-2a47a5bb00cc.Prod_Datastore Prod_Datastore 840f99fb-4689-2f8b-ea10-2a47a5bb00cc.Prod_Datastore1 Prod_Datastore1 840f99fb-4689-2f8b-ea10-2a47a5bb00cc.Prod_Datastore2 Prod_Datastore2 840f99fb-4689-2f8b-ea10-2a47a5bb00cc.Prod_Datastore3 Prod_Datastore3 .Outputs Zerto.Zvm.Models.IDatastoreNativeApi .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/get-zvmvirtualizationsitedatastore #> function Get-ZvmVirtualizationSiteDatastore { [OutputType([Zerto.Zvm.Models.IDatastoreNativeApi])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'Zerto.Zvm.Commandlets\Get-ZvmVirtualizationSiteDatastore_Get'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Returns the list of hosts at a specified virtualization site. .Description Returns the list of hosts at a specified virtualization site. .Example PS C:\>Get-ZvmVirtualizationSiteHost HostIdentifier VirtualizationHostName -------------- ---------------------- 840f99fb-4689-2f8b-ea10-2a47a5bb00cc.MyHost-0 MyHost-0 840f99fb-4689-2f8b-ea10-2a47a5bb00cc.MyHost-1 MyHost-1 Description: The example above lists all the SiteHosts, unfiltered. .Example PS C:\>Get-ZvmVirtualizationSiteHost -HostId 840f99fb-4689-2f8b-ea10-2a47a5bb00cc.MyHost-0 HostIdentifier VirtualizationHostName -------------- ---------------------- 840f99fb-4689-2f8b-ea10-2a47a5bb00cc.MyHost-0 MyHost-0 Description: The example above retrieves a single SiteHost by its identifier. .Example PS C:\>Get-ZvmVirtualizationSiteHost -HostId 'MyHost-1' HostIdentifier VirtualizationHostName -------------- ---------------------- 840f99fb-4689-2f8b-ea10-2a47a5bb00cc.MyHost-1 MyHost-1 Description: The example above retrieves a single SiteHost by its unique name. Note that the "-HostId" parameter can receive either the SiteHost name, or the SiteHost identifier (as in Example 2). .Outputs Zerto.Zvm.Models.IHostNativeApi .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/get-zvmvirtualizationsitehost #> function Get-ZvmVirtualizationSiteHost { [OutputType([Zerto.Zvm.Models.IHostNativeApi])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get1', Position=0, Mandatory)] [Zerto.Zvm.Category('Path')] [System.String] # . ${HostId}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'Zerto.Zvm.Commandlets\Get-ZvmVirtualizationSiteHost_Get'; Get1 = 'Zerto.Zvm.Commandlets\Get-ZvmVirtualizationSiteHost_Get1'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Returns the list of all virtualization sites available. .Description Returns the list of all virtualization sites available. .Example PS C:\>Get-ZvmVirtualizationSite SiteIdentifier VirtualizationSiteName ------------------------------------ ---------------------- 3dba6c5d-3919-49cb-901b-b80ef34b3c01 azure-Site 8c950e40-dd70-4570-a1fe-c2751879c6fd vSphere-Site02 587cfbb5-c22c-4880-995f-df5eb2ddc737 vSphere-Site01 .Outputs Zerto.Zvm.Models.IVirtualizationSiteApi .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/get-zvmvirtualizationsite #> function Get-ZvmVirtualizationSite { [OutputType([Zerto.Zvm.Models.IVirtualizationSiteApi])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'Zerto.Zvm.Commandlets\Get-ZvmVirtualizationSite_Get'; Get1 = 'Zerto.Zvm.Commandlets\Get-ZvmVirtualizationSite_Get1'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Returns information on all protected VMs matching the specified filtering parameters. .Description Returns information on all protected VMs matching the specified filtering parameters. .Example PS C:\>Get-ZvmVm VmName Priority IsVmExists OrganizationName VpgName SourceSite TargetSite Status SubStatus ActualRpo UsedStorageInMb LastTest ------ --------- ---------- ---------------- -------- ---------- -------------- ---------- --------- --------- --------------- -------- MyVM01 Medium True MyVPG01 vSphere-Site01 vSphere-Site02 MeetingSLA None 9 132096 MyVM02 Medium True MyVPG01 vSphere-Site01 vSphere-Site02 MeetingSLA None 9 132096 MyVM03 Medium True MyVPG02 vSphere-Site01 vSphere-Site02 MeetingSLA None 9 132096 .Example PS C:\>Get-ZvmVm -VmId MyVM01 VmName Priority IsVmExists OrganizationName VpgName SourceSite TargetSite Status SubStatus ActualRpo UsedStorageInMb LastTest ------ --------- ---------- ---------------- -------- ---------- -------------- ---------- --------- --------- --------------- -------- MyVM01 Medium True MyVPG01 vSphere-Site01 vSphere-Site02 MeetingSLA None 9 132096 .Outputs Zerto.Zvm.Models.IVMApi .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/get-zvmvm #> function Get-ZvmVm { [OutputType([Zerto.Zvm.Models.IVMApi])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Position=0)] [Zerto.Zvm.Category('Path')] [System.String] # . ${VmId}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${OrgName}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${Priority}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${ProtectedSiteId}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${ProtectedSiteType}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${RecoverySiteId}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${RecoverySiteType}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${SourceSite}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${SourceType}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${Status}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${SubStatus}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${TargetSite}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${TargetType}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${VmName}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${VpgName}, [Parameter(ParameterSetName='Get1')] [Zerto.Zvm.Category('Query')] [System.String] # . ${VpgId}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'Zerto.Zvm.Commandlets\Get-ZvmVm_Get'; Get1 = 'Zerto.Zvm.Commandlets\Get-ZvmVm_Get1'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Returns the list of all checkpoints for a specified virtual protection group (VPG). .Description Returns the list of all checkpoints for a specified virtual protection group (VPG). Note: Parameter 'VpgId' accepts VPG name as well as VPG GUID .Example PS C:\>Get-ZvmVpgCheckpoint vpganame_1 CheckpointIdentifier Type TimeStamp Tag -------------------- ---- --------- --- 46074 Standard 12/19/2020 9:36:41 AM 46250 Standard 12/19/2020 9:51:44 AM 46426 Standard 12/19/2020 10:06:45 AM 46602 Standard 12/19/2020 10:21:46 AM 46779 Standard 12/19/2020 10:36:48 AM 46956 Standard 12/19/2020 10:51:48 AM .Outputs Zerto.Zvm.Models.ICheckpointApi .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/get-zvmvpgcheckpoint #> function Get-ZvmVpgCheckpoint { [OutputType([Zerto.Zvm.Models.ICheckpointApi])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Position=0, Mandatory)] [Zerto.Zvm.Category('Path')] [System.String] # . ${VpgId}, [Parameter(ParameterSetName='Get1', Position=1, Mandatory)] [Zerto.Zvm.Category('Path')] [System.String] # . ${CheckpointId}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.DateTime] # . ${EndDate}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.DateTime] # . ${StartDate}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'Zerto.Zvm.Commandlets\Get-ZvmVpgCheckpoint_Get'; Get1 = 'Zerto.Zvm.Commandlets\Get-ZvmVpgCheckpoint_Get1'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Returns the list of all virtual protection groups (VPGs) protected on the site processing the API. .Description Returns the list of all virtual protection groups (VPGs) protected on the site processing the API. Note: Parameter 'VpgId' accepts VPG name as well as VPG GUID .Example PS C:\>Get-ZvmVpg VpgName Priority OrganizationName ServiceProfileName SourceSite TargetSite VmsCount Status SubStatus ActualRpo UsedStorageInMb LastTest ------- -------- ---------------- ------------------ ---------- ---------- -------- ------ --------- --------- --------------- -------- MyVPG01 Medium vSphere-Site01 vSphere-Site02 MeetingSLA None 7 396288 MyVPG02 Medium vSphere-Site01 vSphere-Site02 MeetingSLA None 7 924672 MyVPG03 Medium vSphere-Site01 vSphere-Site02 MeetingSLA None 7 528384 MyVPG05 Medium vSphere-Site01 vSphere-Site02 MeetingSLA None 7 528384 MyVPG06 Medium vSphere-Site03 vSphere-Site04 MeetingSLA None 7 528384 Exchange Medium vSphere-Site03 vSphere-Site04 MeetingSLA None 7 528384 Description: The example above lists all the VPGs, unfiltered. .Example PS C:\>Get-ZvmVpg -VpgId 2819e5cd-499e-4649-9575-71cbd4ec7cea VpgName Priority OrganizationName ServiceProfileName SourceSite TargetSite VmsCount Status SubStatus ActualRpo UsedStorageInMb LastTest ------- -------- ---------------- ------------------ ---------- ---------- -------- ------ --------- --------- --------------- -------- MyVPG05 Medium vSphere-Site01 vSphere-Site02 MeetingSLA None 7 396288 Description: The example above retrieves a single VPG by its GUID identifier. .Example PS C:\>Get-ZvmVpg -VpgId 'MyVPG06' VpgName Priority OrganizationName ServiceProfileName SourceSite TargetSite VmsCount Status SubStatus ActualRpo UsedStorageInMb LastTest ------- -------- ---------------- ------------------ ---------- ---------- -------- ------ --------- --------- --------------- -------- MyVPG06 Medium vSphere-Site03 vSphere-Site04 MeetingSLA None 7 396288 Description: The example above retrieves a single VPG by its unique name. Note that the "-VpgId" parameter can receive either the VPG name, or the VPG identifier GUID (as in Example 2). .Example PS C:\>Get-ZvmVpg 'MyVPG06' VpgName Priority OrganizationName ServiceProfileName SourceSite TargetSite VmsCount Status SubStatus ActualRpo UsedStorageInMb LastTest ------- -------- ---------------- ------------------ ---------- ---------- -------- ------ --------- --------- --------------- -------- MyVPG06 Medium vSphere-Site03 vSphere-Site04 MeetingSLA None 7 396288 Description: The example above retrieves a single VPG by its unique name (like Example 3). Note that since "-VpgId" is a default parameter of this cmdlet, it can be omitted altogether. .Example PS C:\>Get-ZvmVpg -SourceSite vSphere-Site03 VpgName Priority OrganizationName ServiceProfileName SourceSite TargetSite VmsCount Status SubStatus ActualRpo UsedStorageInMb LastTest ------- -------- ---------------- ------------------ ---------- ---------- -------- ------ --------- --------- --------------- -------- Exchange Medium vSphere-Site03 vSphere-Site04 MeetingSLA None 7 528384 MyVPG06 Medium vSphere-Site03 vSphere-Site04 MeetingSLA None 7 528384 Description: In the example above the VPG list is filtered by a "SourceSite" column value. .Example PS C:\>(Get-ZvmVpg -VpgId 'MyVPG03').VpgIdentifier 2819e5cd-497e-4649-9575-71cbd4ec7cea Description: The example above shows how to treat cmdlet output result as object, e.g. to fetch the 'VpgIdentifier' field only. .Outputs Zerto.Zvm.Models.IVpgApi .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/get-zvmvpg #> function Get-ZvmVpg { [OutputType([Zerto.Zvm.Models.IVpgApi])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get1', Position=0, Mandatory)] [Zerto.Zvm.Category('Path')] [System.String] # . ${VpgId}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.Management.Automation.SwitchParameter] # . ${BackupEnabled}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${OrgName}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${Priority}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${ProtectedSiteId}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${ProtectedSiteType}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${RecoverySiteId}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${RecoverySiteType}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${ServiceProfile}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${SourceSite}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${SourceType}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${Status}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${SubStatus}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${TargetSite}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${TargetType}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${VpgName}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${ZorgId}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'Zerto.Zvm.Commandlets\Get-ZvmVpg_Get'; Get1 = 'Zerto.Zvm.Commandlets\Get-ZvmVpg_Get1'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Returns the list of all Vras on the site processing the API. .Description Returns the list of all Vras on the site processing the API. .Example PS C:\>Get-ZvmVra VraName VraVersion Status DatastoreClusterName DatastoreName HostDisplayName HostVersion IPAddress NetworkName VraGroup ------- ---------- ------ -------------------- ------------- --------------- ----------- --------- ----------- -------- Z-VRA-10.171.80.74 8.5 Installed inf_QANested0113_DS1 10.171.80.74 6.7 10.171.82.64 VM Network default_group Z-VRA-10.171.82.173 8.5 Installed DatastoreCluster inf_QANested0113_DS2 10.171.82.173 6.7 10.171.81.174 VM Network default_group .Example PS C:\>Get-ZvmVra -DatastoreName "Prod_Datastore" VraName VraVersion Status DatastoreClusterName DatastoreName HostDisplayName HostVersion IPAddress NetworkName VraGroup ------- ---------- ------ -------------------- ------------- --------------- ----------- --------- ----------- -------- VRA-MyHost-0 8.5 Installed Prod_Datastore MyHost-0 6.5 192.168.1.10 Test Network default_group VRA-MyHost-1 8.5 Installed Prod_Datastore MyHost-1 6.5 192.168.1.11 Test Network default_group .Outputs Zerto.Zvm.Models.IVraApi .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/get-zvmvra #> function Get-ZvmVra { [OutputType([Zerto.Zvm.Models.IVraApi])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get1', Position=0, Mandatory)] [Zerto.Zvm.Category('Path')] [System.String] # . ${VraId}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${DatastoreClusterName}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${DatastoreName}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${HostVersion}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${IPAddress}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${NetworkName}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${Status}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${VraGroup}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${VraIPConfigurationTypeApi}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${VraName}, [Parameter(ParameterSetName='Get')] [Zerto.Zvm.Category('Query')] [System.String] # . ${VraVersion}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'Zerto.Zvm.Commandlets\Get-ZvmVra_Get'; Get1 = 'Zerto.Zvm.Commandlets\Get-ZvmVra_Get1'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Removes SSL certificate check .Description Removes SSL certificate check .Example PS C:\>Remove-ZvmSslCheck .Outputs System.Boolean .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/remove-zvmsslcheck #> function Remove-ZvmSslCheck { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Remove', PositionalBinding=$false)] param() begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Remove = 'Zerto.Zvm.Commandlets\Remove-ZvmSslCheck_Remove'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Sets the license for a ZVM .Description Sets the license for a ZVM .Example PS C:\>Set-ZvmLicense -LicenseKey 5FBD8JZ1JBFGHTX6LKNZC89YHTS5SGLTUKZ .Example PS C:\>Set-ZvmLicense -LicenseKey InvalidLicenceKey Set-ZvmLicense_SetExpanded: Exception occurred in API: Invalid License Key .Inputs Zerto.Zvm.Models.ILicenseKeyApi .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. DATA <ILicenseKeyApi>: . [LicenseKey <String>]: .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/set-zvmlicense #> function Set-ZvmLicense { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Set', Mandatory, ValueFromPipeline)] [Zerto.Zvm.Category('Body')] [Zerto.Zvm.Models.ILicenseKeyApi] # . # To construct, see NOTES section for DATA properties and create a hash table. ${Data}, [Parameter(ParameterSetName='SetExpanded', Position=0, Mandatory)] [Zerto.Zvm.Category('Body')] [System.String] # . ${LicenseKey}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Set = 'Zerto.Zvm.Commandlets\Set-ZvmLicense_Set'; SetExpanded = 'Zerto.Zvm.Commandlets\Set-ZvmLicense_SetExpanded'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Starts Pairing to a remote site .Description Starts Pairing to a remote site Note: Commandlet returns TaskId. Execute 'Get-ZvmTask TaskId' to get more info about running task .Example PS C:\>Start-ZvmPair -Host MyHost01.company.com -Port 7071 -Token NIjkLnTa5OtTJ0CHWfkSsMGch/6wvNQ4ddBIHZDLYhqGlJY0z/FI8wmup+c= e89e43b3-4fb5-43f0-a0fa-3ec4b4d87d18.587cfbb5-c22c-4880-995f-df5eb2ddc737 Description: To obtain pairing token, execute 'Get-ZvmPairingToken' for another host .Inputs Zerto.Zvm.Models.IPairDataApi .Outputs System.String .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. DATA <IPairDataApi>: . [HostName <String>]: [Port <Int32?>]: [Token <String>]: .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/start-zvmpair #> function Start-ZvmPair { [OutputType([System.String])] [CmdletBinding(DefaultParameterSetName='StartExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Start', Mandatory, ValueFromPipeline)] [Zerto.Zvm.Category('Body')] [Zerto.Zvm.Models.IPairDataApi] # . # To construct, see NOTES section for DATA properties and create a hash table. ${Data}, [Parameter(ParameterSetName='StartExpanded', Position=0, Mandatory)] [Zerto.Zvm.Category('Body')] [System.String] # . ${HostName}, [Parameter(ParameterSetName='StartExpanded', Position=1, Mandatory)] [Zerto.Zvm.Category('Body')] [System.Int32] # . ${Port}, [Parameter(ParameterSetName='StartExpanded', Position=2, Mandatory)] [Zerto.Zvm.Category('Body')] [System.String] # . ${Token}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Start = 'Zerto.Zvm.Commandlets\Start-ZvmPair_Start'; StartExpanded = 'Zerto.Zvm.Commandlets\Start-ZvmPair_StartExpanded'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Starts cloning a specified virtual protection group (VPG) using a specified checkpoint or the latest checkpoint if one is not specified. Returns the task identifier of the operation, which can be used to monitor the operation using the Tasks API. .Description Starts cloning a specified virtual protection group (VPG) using a specified checkpoint or the latest checkpoint if one is not specified. Returns the task identifier of the operation, which can be used to monitor the operation using the Tasks API. Note: Parameter 'VpgId' accepts VPG name as well as VPG GUID Commandlet returns TaskId. Execute 'Get-ZvmTask TaskId' to get more info about running task .Example PS C:\>Start-ZvmVpgClone vpganame_1 db1075a6-94a4-4c15-9123-44107d6bb261.a728fb12-2c12-4c9c-872d-47c815fa2b70 .Inputs Zerto.Zvm.Models.ICloneStartDataApi .Outputs System.String .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. DATA <ICloneStartDataApi>: . [CheckpointId <String>]: [DatastoreIdentifier <String>]: [VmIdentifiers <String[]>]: .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/start-zvmvpgclone #> function Start-ZvmVpgClone { [OutputType([System.String])] [CmdletBinding(DefaultParameterSetName='StartExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Position=0, Mandatory)] [Zerto.Zvm.Category('Path')] [System.String] # . ${VpgId}, [Parameter(ParameterSetName='Start', Mandatory, ValueFromPipeline)] [Zerto.Zvm.Category('Body')] [Zerto.Zvm.Models.ICloneStartDataApi] # . # To construct, see NOTES section for DATA properties and create a hash table. ${Data}, [Parameter(ParameterSetName='StartExpanded', Position=1)] [Zerto.Zvm.Category('Body')] [System.String] # . ${CheckpointId}, [Parameter(ParameterSetName='StartExpanded', Position=2)] [Zerto.Zvm.Category('Body')] [System.String] # . ${DatastoreId}, [Parameter(ParameterSetName='StartExpanded')] [Zerto.Zvm.Category('Body')] [System.String[]] # . ${VmIdentifiers}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Start = 'Zerto.Zvm.Commandlets\Start-ZvmVpgClone_Start'; StartExpanded = 'Zerto.Zvm.Commandlets\Start-ZvmVpgClone_StartExpanded'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Delete VPG. Returns TaskIdentifier of delete task. .Description Delete VPG. Returns TaskIdentifier of delete task. Note: Parameter 'VpgId' accepts VPG name as well as VPG GUID Commandlet returns TaskId. Execute 'Get-ZvmTask TaskId' to get more info about running task .Example PS C:\>Start-ZvmVpgDelete “vpga name_1” db1075a6-94a4-4c15-9123-44107d6bb261.a728fb12-2c12-4c9c-872d-47c815fa2b70 .Inputs Zerto.Zvm.Models.IVpgDeleteDataApi .Outputs System.String .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. DATA <IVpgDeleteDataApi>: . [Force <Boolean?>]: [KeepRecoveryVolumes <Boolean?>]: .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/start-zvmvpgdelete #> function Start-ZvmVpgDelete { [OutputType([System.String])] [CmdletBinding(DefaultParameterSetName='StartExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Position=0, Mandatory)] [Zerto.Zvm.Category('Path')] [System.String] # . ${VpgId}, [Parameter(ParameterSetName='Start', Mandatory, ValueFromPipeline)] [Zerto.Zvm.Category('Body')] [Zerto.Zvm.Models.IVpgDeleteDataApi] # . # To construct, see NOTES section for DATA properties and create a hash table. ${Data}, [Parameter(ParameterSetName='StartExpanded')] [Zerto.Zvm.Category('Body')] [System.Management.Automation.SwitchParameter] # . ${Force}, [Parameter(ParameterSetName='StartExpanded')] [Zerto.Zvm.Category('Body')] [System.Management.Automation.SwitchParameter] # . ${KeepRecoveryVolumes}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Start = 'Zerto.Zvm.Commandlets\Start-ZvmVpgDelete_Start'; StartExpanded = 'Zerto.Zvm.Commandlets\Start-ZvmVpgDelete_StartExpanded'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Starts a failover test failover of a specified virtual protection group (VPG) with a specified checkpoint. Returns the task identifier of the operation, which can be used to monitor the operation using the Tasks API. .Description Starts a failover test failover of a specified virtual protection group (VPG) with a specified checkpoint. Returns the task identifier of the operation, which can be used to monitor the operation using the Tasks API. Note: Parameter 'VpgId' accepts VPG name as well as VPG GUID Commandlet returns TaskId. Execute 'Get-ZvmTask TaskId' to get more info about running task .Example PS C:\>Start-ZvmVpgFailoverTest vpganame_1 db1075a6-94a4-4c15-9123-44107d6bb261.a728fb12-2c12-4c9c-872d-47c815fa2b70 .Inputs Zerto.Zvm.Models.IFailOverTestStartDataApi .Outputs System.String .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. DATA <IFailOverTestStartDataApi>: . [CheckpointIdentifier <String>]: [VmIdentifiers <String[]>]: .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/start-zvmvpgfailovertest #> function Start-ZvmVpgFailoverTest { [OutputType([System.String])] [CmdletBinding(DefaultParameterSetName='StartExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Position=0, Mandatory)] [Zerto.Zvm.Category('Path')] [System.String] # . ${VpgId}, [Parameter(ParameterSetName='Start', Mandatory, ValueFromPipeline)] [Zerto.Zvm.Category('Body')] [Zerto.Zvm.Models.IFailOverTestStartDataApi] # . # To construct, see NOTES section for DATA properties and create a hash table. ${Data}, [Parameter(ParameterSetName='StartExpanded')] [Zerto.Zvm.Category('Body')] [System.String] # . ${CheckpointId}, [Parameter(ParameterSetName='StartExpanded')] [Zerto.Zvm.Category('Body')] [System.String[]] # . ${VmIdentifiers}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Start = 'Zerto.Zvm.Commandlets\Start-ZvmVpgFailoverTest_Start'; StartExpanded = 'Zerto.Zvm.Commandlets\Start-ZvmVpgFailoverTest_StartExpanded'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Forces synchronize a specified virtual protection group (VPG). Returns the task identifier of the operation, which can be used to monitor the operation using the Tasks API. .Description Forces synchronize a specified virtual protection group (VPG). Returns the task identifier of the operation, which can be used to monitor the operation using the Tasks API. Note: Parameter 'VpgId' accepts VPG name as well as VPG GUID Commandlet returns TaskId. Execute 'Get-ZvmTask TaskId' to get more info about running task .Example PS C:\>Start-ZvmVpgForceSync vpganame_1 db1075a6-94a4-4c15-9123-44107d6bb261.a728fb12-2c12-4c9c-872d-47c815fa2b70 .Outputs System.String .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/start-zvmvpgforcesync #> function Start-ZvmVpgForceSync { [OutputType([System.String])] [CmdletBinding(DefaultParameterSetName='Start', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Position=0, Mandatory)] [Zerto.Zvm.Category('Path')] [System.String] # . ${VpgId}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Start = 'Zerto.Zvm.Commandlets\Start-ZvmVpgForceSync_Start'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Pauses the protection of a specified virtual protection group (VPG). Returns the task identifier of the operation, which can be used to monitor the operation using the Tasks API. .Description Pauses the protection of a specified virtual protection group (VPG). Returns the task identifier of the operation, which can be used to monitor the operation using the Tasks API. Note: Parameter 'VpgId' accepts VPG name as well as VPG GUID Commandlet returns TaskId. Execute 'Get-ZvmTask TaskId' to get more info about running task .Example PS C:\>Start-ZvmVpgPause vpganame_1 db1075a6-94a4-4c15-9123-44107d6bb261.a728fb12-2c12-4c9c-872d-47c815fa2b70 .Outputs System.String .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/start-zvmvpgpause #> function Start-ZvmVpgPause { [OutputType([System.String])] [CmdletBinding(DefaultParameterSetName='Start', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Position=0, Mandatory)] [Zerto.Zvm.Category('Path')] [System.String] # . ${VpgId}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Start = 'Zerto.Zvm.Commandlets\Start-ZvmVpgPause_Start'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Resumes the protection of a specified virtual protection group (VPG). Returns the task identifier of the operation, which can be used to monitor the operation using the Tasks API. .Description Resumes the protection of a specified virtual protection group (VPG). Returns the task identifier of the operation, which can be used to monitor the operation using the Tasks API. Note: Parameter 'VpgId' accepts VPG name as well as VPG GUID Commandlet returns TaskId. Execute 'Get-ZvmTask TaskId' to get more info about running task .Example PS C:\>Start-ZvmVpgResume vpganame_1 db1075a6-94a4-4c15-9123-44107d6bb261.a728fb12-2c12-4c9c-872d-47c815fa2b70 .Outputs System.String .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/start-zvmvpgresume #> function Start-ZvmVpgResume { [OutputType([System.String])] [CmdletBinding(DefaultParameterSetName='Start', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Position=0, Mandatory)] [Zerto.Zvm.Category('Path')] [System.String] # . ${VpgId}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Start = 'Zerto.Zvm.Commandlets\Start-ZvmVpgResume_Start'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Inserts a tag (text) to a new checkpoint of a specified virtual protection group (VPG). Returns the task identifier of the operation, which can be used to monitor the operation using the Tasks API. .Description Inserts a tag (text) to a new checkpoint of a specified virtual protection group (VPG). Returns the task identifier of the operation, which can be used to monitor the operation using the Tasks API. Note: Parameter 'VpgId' accepts VPG name as well as VPG GUID Commandlet returns TaskId. Execute 'Get-ZvmTask TaskId' to get more info about running task .Example PS C:\>Start-ZvmVpgTaggedCheckpointInsert vpganame_1 -Body $vpgInsertTagCheckpointData db1075a6-94a4-4c15-9123-44107d6bb261.a728fb12-2c12-4c9c-872d-47c815fa2b70 .Inputs Zerto.Zvm.Models.IVpgInsertTagCheckpointDataApi .Outputs System.String .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. DATA <IVpgInsertTagCheckpointDataApi>: . [CheckpointName <String>]: .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/start-zvmvpgtaggedcheckpointinsert #> function Start-ZvmVpgTaggedCheckpointInsert { [OutputType([System.String])] [CmdletBinding(DefaultParameterSetName='StartExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Position=0, Mandatory)] [Zerto.Zvm.Category('Path')] [System.String] # . ${VpgId}, [Parameter(ParameterSetName='Start', Mandatory, ValueFromPipeline)] [Zerto.Zvm.Category('Body')] [Zerto.Zvm.Models.IVpgInsertTagCheckpointDataApi] # . # To construct, see NOTES section for DATA properties and create a hash table. ${Data}, [Parameter(ParameterSetName='StartExpanded', Position=1)] [Zerto.Zvm.Category('Body')] [System.String] # . ${CheckpointName}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Start = 'Zerto.Zvm.Commandlets\Start-ZvmVpgTaggedCheckpointInsert_Start'; StartExpanded = 'Zerto.Zvm.Commandlets\Start-ZvmVpgTaggedCheckpointInsert_StartExpanded'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Start the execution of the change recovery host operation. .Description Start the execution of the change recovery host operation. Note: Commandlet returns TaskId. Execute 'Get-ZvmTask TaskId' to get more info about running task .Example PS C:\>Start-ZvmVraChangeRecoveryHost someVra -Body $vraChangeRecoveryHostSettings db1075a6-94a4-4c15-9123-44107d6bb261.a728fb12-2c12-4c9c-872d-47c815fa2b70 .Inputs Zerto.Zvm.Models.IVraChangeRecoveryHostSettingsApi .Outputs System.String .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. DATA <IVraChangeRecoveryHostSettingsApi>: . [VmsAllocations <IVraVMAllocationApi[]>]: [HostIdentifier <String>]: [VmIdentifier <String>]: VMSALLOCATIONS <IVraVMAllocationApi[]>: . [HostIdentifier <String>]: [VmIdentifier <String>]: .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/start-zvmvrachangerecoveryhost #> function Start-ZvmVraChangeRecoveryHost { [OutputType([System.String])] [CmdletBinding(DefaultParameterSetName='Start', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Position=0, Mandatory)] [Zerto.Zvm.Category('Path')] [System.String] # . ${VraId}, [Parameter(ParameterSetName='Start', Mandatory, ValueFromPipeline)] [Zerto.Zvm.Category('Body')] [Zerto.Zvm.Models.IVraChangeRecoveryHostSettingsApi] # . # To construct, see NOTES section for DATA properties and create a hash table. ${Data}, [Parameter(ParameterSetName='StartExpanded', Position=1, Mandatory)] [Zerto.Zvm.Category('Body')] [Zerto.Zvm.Models.IVraVMAllocationApi[]] # . # To construct, see NOTES section for VMSALLOCATIONS properties and create a hash table. ${VmsAllocations}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Start = 'Zerto.Zvm.Commandlets\Start-ZvmVraChangeRecoveryHost_Start'; StartExpanded = 'Zerto.Zvm.Commandlets\Start-ZvmVraChangeRecoveryHost_StartExpanded'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Aborts cloning of a specified virtual protection group (VPG). Returns the task identifier of the operation, which can be used to monitor the operation using the Tasks API. .Description Aborts cloning of a specified virtual protection group (VPG). Returns the task identifier of the operation, which can be used to monitor the operation using the Tasks API. Note: Parameter 'VpgId' accepts VPG name as well as VPG GUID Commandlet returns TaskId. Execute 'Get-ZvmTask TaskId' to get more info about running task .Example PS C:\>Stop-ZvmVpgClone vpganame_1 db1075a6-94a4-4c15-9123-44107d6bb261.a728fb12-2c12-4c9c-872d-47c815fa2b70 .Outputs System.Boolean .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/stop-zvmvpgclone #> function Stop-ZvmVpgClone { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Stop', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Position=0, Mandatory)] [Zerto.Zvm.Category('Path')] [System.String] # . ${VpgId}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Stop = 'Zerto.Zvm.Commandlets\Stop-ZvmVpgClone_Stop'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Stops a failover test, after supplying whether the test was successful and an optional summary. Returns the task identifier of the operation, which can be used to monitor the operation using the Tasks API. .Description Stops a failover test, after supplying whether the test was successful and an optional summary. Returns the task identifier of the operation, which can be used to monitor the operation using the Tasks API. Note: Parameter 'VpgId' accepts VPG name as well as VPG GUID Commandlet returns TaskId. Execute 'Get-ZvmTask TaskId' to get more info about running task .Example PS C:\>Stop-ZvmVpgFailoverTest vpganame_1 db1075a6-94a4-4c15-9123-44107d6bb261.a728fb12-2c12-4c9c-872d-47c815fa2b70 .Inputs Zerto.Zvm.Models.IStopFailoverTestDataApi .Outputs System.String .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. DATA <IStopFailoverTestDataApi>: . [FailoverTestSuccess <Boolean?>]: [FailoverTestSummary <String>]: .Link https://docs.microsoft.com/en-us/powershell/module/zerto.zvm.commandlets/stop-zvmvpgfailovertest #> function Stop-ZvmVpgFailoverTest { [OutputType([System.String])] [CmdletBinding(DefaultParameterSetName='StopExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Position=0, Mandatory)] [Zerto.Zvm.Category('Path')] [System.String] # . ${VpgId}, [Parameter(ParameterSetName='Stop', Mandatory, ValueFromPipeline)] [Zerto.Zvm.Category('Body')] [Zerto.Zvm.Models.IStopFailoverTestDataApi] # . # To construct, see NOTES section for DATA properties and create a hash table. ${Data}, [Parameter(ParameterSetName='StopExpanded')] [Zerto.Zvm.Category('Body')] [System.Management.Automation.SwitchParameter] # . ${FailoverTestSuccess}, [Parameter(ParameterSetName='StopExpanded', Position=1)] [Zerto.Zvm.Category('Body')] [System.String] # . ${FailoverTestSummary}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [Zerto.Zvm.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Zerto.Zvm.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Stop = 'Zerto.Zvm.Commandlets\Stop-ZvmVpgFailoverTest_Stop'; StopExpanded = 'Zerto.Zvm.Commandlets\Stop-ZvmVpgFailoverTest_StopExpanded'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } |