Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -49,6 +49,7 @@ If you are using this as part of a larger script, I highly suggest explicitly en
|
||||
|
||||
## Recent Updates
|
||||
|
||||
- March 15th, 2019: Implement Export and Import Functionality. Please See [Export-ZertoVpg Help](https://github.com/wcarroll/ZertoApiWrapper/blob/master/docs/Export-ZertoVpg.md) and [Import-ZertoVpg Help](https://github.com/wcarroll/ZertoApiWrapper/blob/master/docs/Import-ZertoVpg.md) for assistance. No current pre-seed support.
|
||||
- March 11th, 2019: Create basic VPG completed. Please see [New-ZertoVpg Help](https://github.com/wcarroll/ZertoApiWrapper/blob/master/docs/New-ZertoVpg.md)
|
||||
|
||||
## TODO
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
function Export-ZertoVpg {
|
||||
[cmdletbinding()]
|
||||
param(
|
||||
[Parameter(
|
||||
HelpMessage = "Location where to dump the resulting JSON files containing the VPG Settings",
|
||||
Mandatory = $true
|
||||
)]
|
||||
[string]$outputFolder,
|
||||
[parameter(
|
||||
HelpMessage = "Name(s) of the VPG(s) to be exported",
|
||||
ParameterSetName = "namedVpgs"
|
||||
)]
|
||||
[string[]]$vpgName,
|
||||
[parameter(
|
||||
HelpMessage = "Export all VPGs at this site",
|
||||
ParameterSetName = "allVpgs",
|
||||
valuefrompipeline = $true,
|
||||
ValueFromPipelineByPropertyName = $true
|
||||
)]
|
||||
[switch]$allVpgs
|
||||
)
|
||||
|
||||
begin {
|
||||
if ($allVpgs) {
|
||||
$vpgName = $(Get-ZertoVpg).vpgName
|
||||
}
|
||||
}
|
||||
|
||||
process {
|
||||
foreach ($name in $vpgName) {
|
||||
$vpgSettingsIdentifier = New-ZertoVpgSettingsIdentifier -vpgIdentifier $(Get-ZertoVpg -name $name).vpgIdentifier
|
||||
$vpgSettings = Get-ZertoVpgSetting -vpgSettingsIdentifier $vpgSettingsIdentifier
|
||||
$filePath = "{0}\{1}.json" -f $outputPath, $name
|
||||
$vpgSettings | Convertto-Json -depth 10 | Out-File -FilePath $filePath
|
||||
}
|
||||
}
|
||||
|
||||
end {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
function Import-ZertoVpg {
|
||||
[cmdletbinding()]
|
||||
param(
|
||||
[Parameter(
|
||||
HelpMessage = "VPG settings JSON file(s) to import.",
|
||||
Mandatory = $true,
|
||||
ValueFromPipeline = $true,
|
||||
ValueFromPipelineByPropertyName = $true
|
||||
)]
|
||||
[Alias("FullName")]
|
||||
[string[]]$settingsFile
|
||||
)
|
||||
|
||||
begin {
|
||||
$baseUri = "vpgSettings"
|
||||
}
|
||||
|
||||
process {
|
||||
foreach ($file in $settingsFile) {
|
||||
$importedSettings = Get-Content -Path $file -Raw | ConvertFrom-Json
|
||||
$vpgSettingsIdentifier = New-ZertoVpgSettingsIdentifier -newVpg
|
||||
$importedSettings.VpgIdentifier = $null
|
||||
$importedSettings.VpgSettingsIdentifier = $vpgSettingsIdentifier
|
||||
$uri = "{0}/{1}" -f $baseUri, $vpgSettingsIdentifier
|
||||
Invoke-ZertoRestRequest -uri $uri -method "PUT" -body $($importedSettings | convertto-json -Depth 10)
|
||||
$vpgSettingsIdentifier | Save-ZertoVpgSettings
|
||||
if ($settingsFile.Count -gt 1) {
|
||||
Start-Sleep 5
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
end {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -228,7 +228,7 @@ function New-ZertoVpg {
|
||||
process {
|
||||
$baseUri = "vpgsettings"
|
||||
# Create a VPG Settings Identifier
|
||||
$vpgSettingsIdentifier = Invoke-ZertoRestRequest -uri $baseUri -body "{}" -method "POST"
|
||||
$vpgSettingsIdentifier = New-ZertoVpgSettingsIdentifier -newVpg
|
||||
# Put base settings into an object easy to manipulate
|
||||
$baseSettings = Get-ZertoVpgSetting -vpgSettingsIdentifier $vpgSettingsIdentifier
|
||||
# Set settings equal to passed and default parameters
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
function New-ZertoVpgSettingsIdentifier {
|
||||
[cmdletbinding()]
|
||||
param(
|
||||
[Parameter(
|
||||
HelpMessage = "Identifier of the VPG to create a VPG settings identifier. If a vpgIdentifier is not provided, a new VPG settings object is created without any configured settings. This would be used for creating a new VPG from scratch.",
|
||||
ParameterSetName = "existingVpg",
|
||||
Mandatory = $true,
|
||||
ValueFromPipeline = $true,
|
||||
ValueFromPipelineByPropertyName = $true
|
||||
)]
|
||||
[string]$vpgIdentifier,
|
||||
[Parameter(
|
||||
HelpMessage = "Use this switch when creating a vpgSettingsIdentifier for a new VPG",
|
||||
ParameterSetName = "newVpg",
|
||||
Mandatory = $true
|
||||
)]
|
||||
[switch]$newVpg
|
||||
)
|
||||
|
||||
begin {
|
||||
$baseUri = "vpgSettings"
|
||||
switch ($PSCmdlet.ParameterSetName) {
|
||||
"newVpg" {
|
||||
$body = "{}"
|
||||
}
|
||||
|
||||
"existingVpg" {
|
||||
$body = "{""VpgIdentifier"":""$vpgIdentifier""}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
process {
|
||||
Invoke-ZertoRestRequest -uri $baseUri -body $body -Method "POST"
|
||||
}
|
||||
|
||||
end {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -754,6 +754,163 @@
|
||||
</maml:navigationLink>
|
||||
</command:relatedLinks>
|
||||
</command:command>
|
||||
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
|
||||
<command:details>
|
||||
<command:name>Export-ZertoVpg</command:name>
|
||||
<command:verb>Export</command:verb>
|
||||
<command:noun>ZertoVpg</command:noun>
|
||||
<maml:description>
|
||||
<maml:para>Exports a VPG Settings Object to a JSON file. This file can be used to re-import the VPG at a later time.</maml:para>
|
||||
</maml:description>
|
||||
</command:details>
|
||||
<maml:description>
|
||||
<maml:para>Exports a VPG Settings Object to a JSON file. This file can be used to re-import the VPG at a later time.</maml:para>
|
||||
</maml:description>
|
||||
<command:syntax>
|
||||
<command:syntaxItem>
|
||||
<maml:name>Export-ZertoVpg</maml:name>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="named" aliases="none">
|
||||
<maml:name>allVpgs</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Export all VPGs at this site</maml:para>
|
||||
</maml:Description>
|
||||
<dev:type>
|
||||
<maml:name>SwitchParameter</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>False</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>outputFolder</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Location where to dump the resulting JSON files containing the VPG Settings</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>String</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
</command:syntaxItem>
|
||||
<command:syntaxItem>
|
||||
<maml:name>Export-ZertoVpg</maml:name>
|
||||
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>outputFolder</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Location where to dump the resulting JSON files containing the VPG Settings</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>String</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>vpgName</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Name(s) of the VPG(s) to be exported</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>String[]</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
</command:syntaxItem>
|
||||
</command:syntax>
|
||||
<command:parameters>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="named" aliases="none">
|
||||
<maml:name>allVpgs</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Export all VPGs at this site</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>SwitchParameter</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>False</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>outputFolder</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Location where to dump the resulting JSON files containing the VPG Settings</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>String</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>vpgName</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Name(s) of the VPG(s) to be exported</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>String[]</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
</command:parameters>
|
||||
<command:inputTypes>
|
||||
<command:inputType>
|
||||
<dev:type>
|
||||
<maml:name>System.Management.Automation.SwitchParameter</maml:name>
|
||||
</dev:type>
|
||||
<maml:description>
|
||||
<maml:para></maml:para>
|
||||
</maml:description>
|
||||
</command:inputType>
|
||||
</command:inputTypes>
|
||||
<command:returnValues>
|
||||
<command:returnValue>
|
||||
<dev:type>
|
||||
<maml:name>System.Object</maml:name>
|
||||
</dev:type>
|
||||
<maml:description>
|
||||
<maml:para></maml:para>
|
||||
</maml:description>
|
||||
</command:returnValue>
|
||||
</command:returnValues>
|
||||
<maml:alertSet>
|
||||
<maml:alert>
|
||||
<maml:para></maml:para>
|
||||
</maml:alert>
|
||||
</maml:alertSet>
|
||||
<command:examples>
|
||||
<command:example>
|
||||
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
|
||||
<dev:code>PS C:> Export-ZertoVpg -outputFolder "C:\ZertoVPGs" -vpgName "My Vpg", "My Other Vpg"</dev:code>
|
||||
<dev:remarks>
|
||||
<maml:para>Exports VPG settings for VPGs "My Vpg" and "My Other Vpg". Each settings object will be placed inside a JSON file at C:\ZertoVPGs\ with the name of the file being the name of the VPG.</maml:para>
|
||||
</dev:remarks>
|
||||
</command:example>
|
||||
<command:example>
|
||||
<maml:title>-------------------------- Example 2 --------------------------</maml:title>
|
||||
<dev:code>PS C:> Export-ZertoVpg -outputFolder "C:\ZertoVPGs" -allVpgs</dev:code>
|
||||
<dev:remarks>
|
||||
<maml:para>Exports VPG settings for all Vpgs replicated to or from this site. Each settings object will be placed inside a JSON file at C:\ZertoVPGs\ with the name of the file being the name of the VPG. If a VPG is in an un-editable state, it cannot be exported.</maml:para>
|
||||
</dev:remarks>
|
||||
</command:example>
|
||||
</command:examples>
|
||||
<command:relatedLinks>
|
||||
<maml:navigationLink>
|
||||
<maml:linkText>Online Version:</maml:linkText>
|
||||
<maml:uri>https://github.com/wcarroll/ZertoApiWrapper/blob/Master/docs/Export-ZertoVpg.md</maml:uri>
|
||||
</maml:navigationLink>
|
||||
<maml:navigationLink>
|
||||
<maml:linkText>Zerto REST API VPG Settings End Point Documentation</maml:linkText>
|
||||
<maml:uri>http://s3.amazonaws.com/zertodownload_docs/Latest/Zerto%20Virtual%20Replication%20Zerto%20Virtual%20Manager%20%28ZVM%29%20-%20vSphere%20Online%20Help/RestfulAPIs/StatusAPIs.5.108.html#</maml:uri>
|
||||
</maml:navigationLink>
|
||||
</command:relatedLinks>
|
||||
</command:command>
|
||||
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
|
||||
<command:details>
|
||||
<command:name>Get-ZertoAlert</command:name>
|
||||
@@ -6414,6 +6571,94 @@
|
||||
</maml:navigationLink>
|
||||
</command:relatedLinks>
|
||||
</command:command>
|
||||
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
|
||||
<command:details>
|
||||
<command:name>Import-ZertoVpg</command:name>
|
||||
<command:verb>Import</command:verb>
|
||||
<command:noun>ZertoVpg</command:noun>
|
||||
<maml:description>
|
||||
<maml:para>Reads in one or more JSON files and imports each one into a VPG.</maml:para>
|
||||
</maml:description>
|
||||
</command:details>
|
||||
<maml:description>
|
||||
<maml:para>Reads in one or several JSON files and imports each one into a VPG. Currently this method does not support using pre-seed volumes. We are working through a method to get this working, but it may be a while until this happens.</maml:para>
|
||||
</maml:description>
|
||||
<command:syntax>
|
||||
<command:syntaxItem>
|
||||
<maml:name>Import-ZertoVpg</maml:name>
|
||||
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="FullName">
|
||||
<maml:name>settingsFile</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>VPG settings JSON file(s) to import.</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>String[]</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
</command:syntaxItem>
|
||||
</command:syntax>
|
||||
<command:parameters>
|
||||
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="FullName">
|
||||
<maml:name>settingsFile</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>VPG settings JSON file(s) to import.</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>String[]</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
</command:parameters>
|
||||
<command:inputTypes>
|
||||
<command:inputType>
|
||||
<dev:type>
|
||||
<maml:name>System.String[]</maml:name>
|
||||
</dev:type>
|
||||
<maml:description>
|
||||
<maml:para></maml:para>
|
||||
</maml:description>
|
||||
</command:inputType>
|
||||
</command:inputTypes>
|
||||
<command:returnValues>
|
||||
<command:returnValue>
|
||||
<dev:type>
|
||||
<maml:name>System.Object</maml:name>
|
||||
</dev:type>
|
||||
<maml:description>
|
||||
<maml:para></maml:para>
|
||||
</maml:description>
|
||||
</command:returnValue>
|
||||
</command:returnValues>
|
||||
<maml:alertSet>
|
||||
<maml:alert>
|
||||
<maml:para></maml:para>
|
||||
</maml:alert>
|
||||
</maml:alertSet>
|
||||
<command:examples>
|
||||
<command:example>
|
||||
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
|
||||
<dev:code>PS C:> Import-ZertoVpg -settingsFile "C:\ZertoVpgs\My Vpg.json"</dev:code>
|
||||
<dev:remarks>
|
||||
<maml:para>Reads in "My Vpg.json", creates a new VPG object, applies all the settings and saves the VPG.</maml:para>
|
||||
</dev:remarks>
|
||||
</command:example>
|
||||
</command:examples>
|
||||
<command:relatedLinks>
|
||||
<maml:navigationLink>
|
||||
<maml:linkText>Online Version:</maml:linkText>
|
||||
<maml:uri>https://github.com/wcarroll/ZertoApiWrapper/blob/Master/docs/Import-ZertoVpg.md</maml:uri>
|
||||
</maml:navigationLink>
|
||||
<maml:navigationLink>
|
||||
<maml:linkText>Zerto REST API VPG Settings End Point Documentation</maml:linkText>
|
||||
<maml:uri>http://s3.amazonaws.com/zertodownload_docs/Latest/Zerto%20Virtual%20Replication%20Zerto%20Virtual%20Manager%20%28ZVM%29%20-%20vSphere%20Online%20Help/RestfulAPIs/StatusAPIs.5.108.html#</maml:uri>
|
||||
</maml:navigationLink>
|
||||
</command:relatedLinks>
|
||||
</command:command>
|
||||
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
|
||||
<command:details>
|
||||
<command:name>Install-ZertoVra</command:name>
|
||||
@@ -7223,11 +7468,11 @@
|
||||
<command:verb>Invoke</command:verb>
|
||||
<command:noun>ZertoFailoverRollback</command:noun>
|
||||
<maml:description>
|
||||
<maml:para>Rollsback a VPG in a Before Commit Failover State</maml:para>
|
||||
<maml:para>Rolls back a VPG in a Before Commit Failover State</maml:para>
|
||||
</maml:description>
|
||||
</command:details>
|
||||
<maml:description>
|
||||
<maml:para>Rollsback a VPG in a Before Commit Failover State</maml:para>
|
||||
<maml:para>Rolls back a VPG in a Before Commit Failover State</maml:para>
|
||||
</maml:description>
|
||||
<command:syntax>
|
||||
<command:syntaxItem>
|
||||
@@ -7290,7 +7535,7 @@
|
||||
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
|
||||
<dev:code>PS C:\> Invoke-ZertoFailoverRollback -vpgName "MyVpg"</dev:code>
|
||||
<dev:remarks>
|
||||
<maml:para>Rollsback VPG "MyVPG" from a Before Commit State</maml:para>
|
||||
<maml:para>Rolls back VPG "MyVPG" from a Before Commit State</maml:para>
|
||||
</dev:remarks>
|
||||
</command:example>
|
||||
</command:examples>
|
||||
@@ -9649,6 +9894,127 @@
|
||||
</maml:navigationLink>
|
||||
</command:relatedLinks>
|
||||
</command:command>
|
||||
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
|
||||
<command:details>
|
||||
<command:name>New-ZertoVpgSettingsIdentifier</command:name>
|
||||
<command:verb>New</command:verb>
|
||||
<command:noun>ZertoVpgSettingsIdentifier</command:noun>
|
||||
<maml:description>
|
||||
<maml:para>Creates and returns a VPG Settings Identifier either for an existing VPG or a new VPG.</maml:para>
|
||||
</maml:description>
|
||||
</command:details>
|
||||
<maml:description>
|
||||
<maml:para>Creates and returns a VPG Settings Identifier either for an existing VPG or a new VPG.</maml:para>
|
||||
</maml:description>
|
||||
<command:syntax>
|
||||
<command:syntaxItem>
|
||||
<maml:name>New-ZertoVpgSettingsIdentifier</maml:name>
|
||||
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>newVpg</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Use this switch when creating a vpgSettingsIdentifier for a new VPG</maml:para>
|
||||
</maml:Description>
|
||||
<dev:type>
|
||||
<maml:name>SwitchParameter</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>False</dev:defaultValue>
|
||||
</command:parameter>
|
||||
</command:syntaxItem>
|
||||
<command:syntaxItem>
|
||||
<maml:name>New-ZertoVpgSettingsIdentifier</maml:name>
|
||||
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="named" aliases="none">
|
||||
<maml:name>vpgIdentifier</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Identifier of the VPG to create a VPG settings identifier. If a vpgIdentifier is not provided, a new VPG settings object is created without any configured settings. This would be used for creating a new VPG from scratch.</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>String</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
</command:syntaxItem>
|
||||
</command:syntax>
|
||||
<command:parameters>
|
||||
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>newVpg</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Use this switch when creating a vpgSettingsIdentifier for a new VPG</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>SwitchParameter</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>False</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="named" aliases="none">
|
||||
<maml:name>vpgIdentifier</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Identifier of the VPG to create a VPG settings identifier. If a vpgIdentifier is not provided, a new VPG settings object is created without any configured settings. This would be used for creating a new VPG from scratch.</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>String</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
</command:parameters>
|
||||
<command:inputTypes>
|
||||
<command:inputType>
|
||||
<dev:type>
|
||||
<maml:name>System.String</maml:name>
|
||||
</dev:type>
|
||||
<maml:description>
|
||||
<maml:para></maml:para>
|
||||
</maml:description>
|
||||
</command:inputType>
|
||||
</command:inputTypes>
|
||||
<command:returnValues>
|
||||
<command:returnValue>
|
||||
<dev:type>
|
||||
<maml:name>System.Object</maml:name>
|
||||
</dev:type>
|
||||
<maml:description>
|
||||
<maml:para></maml:para>
|
||||
</maml:description>
|
||||
</command:returnValue>
|
||||
</command:returnValues>
|
||||
<maml:alertSet>
|
||||
<maml:alert>
|
||||
<maml:para></maml:para>
|
||||
</maml:alert>
|
||||
</maml:alertSet>
|
||||
<command:examples>
|
||||
<command:example>
|
||||
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
|
||||
<dev:code>PS C:> New-ZertoVpgSettingsIdentifier -newVpg</dev:code>
|
||||
<dev:remarks>
|
||||
<maml:para>Creates a Vpg Settings Identifier for a new, blank VPG.</maml:para>
|
||||
</dev:remarks>
|
||||
</command:example>
|
||||
<command:example>
|
||||
<maml:title>-------------------------- Example 2 --------------------------</maml:title>
|
||||
<dev:code>PS C:> New-ZertoVpgSettingsIdentifier -vpgIdentifier "MyVpgIdentifier"</dev:code>
|
||||
<dev:remarks>
|
||||
<maml:para>Creates a Vpg Settings Identifier for an existing VPG. This settings identifier points to a settings object that contains the current settings of the VPG.</maml:para>
|
||||
</dev:remarks>
|
||||
</command:example>
|
||||
</command:examples>
|
||||
<command:relatedLinks>
|
||||
<maml:navigationLink>
|
||||
<maml:linkText>Online Version:</maml:linkText>
|
||||
<maml:uri>https://github.com/wcarroll/ZertoApiWrapper/blob/Master/docs/New-ZertoVpgSettingsIdentifier.md</maml:uri>
|
||||
</maml:navigationLink>
|
||||
<maml:navigationLink>
|
||||
<maml:linkText>Zerto REST API VPG Settings End Point Documentation</maml:linkText>
|
||||
<maml:uri>http://s3.amazonaws.com/zertodownload_docs/Latest/Zerto%20Virtual%20Replication%20Zerto%20Virtual%20Manager%20%28ZVM%29%20-%20vSphere%20Online%20Help/RestfulAPIs/StatusAPIs.5.108.html#</maml:uri>
|
||||
</maml:navigationLink>
|
||||
</command:relatedLinks>
|
||||
</command:command>
|
||||
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
|
||||
<command:details>
|
||||
<command:name>Remove-ZertoVpg</command:name>
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
---
|
||||
external help file: ZertoApiWrapper-help.xml
|
||||
Module Name: ZertoApiWrapper
|
||||
online version: https://github.com/wcarroll/ZertoApiWrapper/blob/Master/docs/Export-ZertoVpg.md
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Export-ZertoVpg
|
||||
|
||||
## SYNOPSIS
|
||||
Exports a VPG Settings Object to a JSON file. This file can be used to re-import the VPG at a later time.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
### namedVpgs
|
||||
```
|
||||
Export-ZertoVpg -outputFolder <String> [-vpgName <String[]>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### allVpgs
|
||||
```
|
||||
Export-ZertoVpg -outputFolder <String> [-allVpgs] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Exports a VPG Settings Object to a JSON file. This file can be used to re-import the VPG at a later time.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:> Export-ZertoVpg -outputFolder "C:\ZertoVPGs" -vpgName "My Vpg", "My Other Vpg"
|
||||
```
|
||||
|
||||
Exports VPG settings for VPGs "My Vpg" and "My Other Vpg". Each settings object will be placed inside a JSON file at C:\ZertoVPGs\ with the name of the file being the name of the VPG.
|
||||
|
||||
### Example 2
|
||||
```powershell
|
||||
PS C:> Export-ZertoVpg -outputFolder "C:\ZertoVPGs" -allVpgs
|
||||
```
|
||||
|
||||
Exports VPG settings for all Vpgs replicated to or from this site. Each settings object will be placed inside a JSON file at C:\ZertoVPGs\ with the name of the file being the name of the VPG. If a VPG is in an un-editable state, it cannot be exported.
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -allVpgs
|
||||
Export all VPGs at this site
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: allVpgs
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName, ByValue)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -outputFolder
|
||||
Location where to dump the resulting JSON files containing the VPG Settings
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -vpgName
|
||||
Name(s) of the VPG(s) to be exported
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: namedVpgs
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### System.Management.Automation.SwitchParameter
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
[Zerto REST API VPG Settings End Point Documentation](http://s3.amazonaws.com/zertodownload_docs/Latest/Zerto%20Virtual%20Replication%20Zerto%20Virtual%20Manager%20%28ZVM%29%20-%20vSphere%20Online%20Help/RestfulAPIs/StatusAPIs.5.108.html#)
|
||||
+14
-26
@@ -14,74 +14,63 @@ Returns information about VPGs
|
||||
## SYNTAX
|
||||
|
||||
### main (Default)
|
||||
|
||||
```PowerShell
|
||||
```
|
||||
Get-ZertoVpg [<CommonParameters>]
|
||||
```
|
||||
|
||||
### stats
|
||||
|
||||
```PowerShell
|
||||
```
|
||||
Get-ZertoVpg -protectionGroupIdentifier <String[]> [-checkpointsStats] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### checkpoints
|
||||
|
||||
```PowerShell
|
||||
Get-ZertoVpg -protectionGroupIdentifier <String[]> [-checkpoints] [-startDate <String>] [-endDate <String>] [<CommonParameters>]
|
||||
```
|
||||
Get-ZertoVpg -protectionGroupIdentifier <String[]> [-checkpoints] [-startDate <String>] [-endDate <String>]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
### protectionGroupIdentifier
|
||||
|
||||
```PowerShell
|
||||
```
|
||||
Get-ZertoVpg -protectionGroupIdentifier <String[]> [<CommonParameters>]
|
||||
```
|
||||
|
||||
### entityTypes
|
||||
|
||||
```PowerShell
|
||||
```
|
||||
Get-ZertoVpg [-entityTypes] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### failoverCommitPolicies
|
||||
|
||||
```PowerShell
|
||||
```
|
||||
Get-ZertoVpg [-failoverCommitPolicies] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### failoverShutdownPolicies
|
||||
|
||||
```PowerShell
|
||||
```
|
||||
Get-ZertoVpg [-failoverShutdownPolicies] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### priorities
|
||||
|
||||
```PowerShell
|
||||
```
|
||||
Get-ZertoVpg [-priorities] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### retentionPolicies
|
||||
|
||||
```PowerShell
|
||||
```
|
||||
Get-ZertoVpg [-retentionPolicies] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### statuses
|
||||
|
||||
```PowerShell
|
||||
```
|
||||
Get-ZertoVpg [-statuses] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### subStatuses
|
||||
|
||||
```PowerShell
|
||||
```
|
||||
Get-ZertoVpg [-subStatuses] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### filter
|
||||
|
||||
```PowerShell
|
||||
```
|
||||
Get-ZertoVpg [-name <String>] [-status <String>] [-subStatus <String>] [-protectedSiteType <String>]
|
||||
[-recoverySiteType <String>] [-protectedSiteIdentifier <String>] [-recoverySiteIdentifier <String>]
|
||||
[-organizationName <String>] [-zorgIdentifier <String>] [-priority <String>]
|
||||
@@ -508,7 +497,6 @@ Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
---
|
||||
external help file: ZertoApiWrapper-help.xml
|
||||
Module Name: ZertoApiWrapper
|
||||
online version: https://github.com/wcarroll/ZertoApiWrapper/blob/Master/docs/Import-ZertoVpg.md
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Import-ZertoVpg
|
||||
|
||||
## SYNOPSIS
|
||||
Reads in one or more JSON files and imports each one into a VPG.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Import-ZertoVpg [-settingsFile] <String[]> [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Reads in one or several JSON files and imports each one into a VPG. Currently this method does not support using pre-seed volumes. We are working through a method to get this working, but it may be a while until this happens.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:> Import-ZertoVpg -settingsFile "C:\ZertoVpgs\My Vpg.json"
|
||||
```
|
||||
|
||||
Reads in "My Vpg.json", creates a new VPG object, applies all the settings and saves the VPG.
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -settingsFile
|
||||
VPG settings JSON file(s) to import.
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: FullName
|
||||
|
||||
Required: True
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName, ByValue)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### System.String[]
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
[Zerto REST API VPG Settings End Point Documentation](http://s3.amazonaws.com/zertodownload_docs/Latest/Zerto%20Virtual%20Replication%20Zerto%20Virtual%20Manager%20%28ZVM%29%20-%20vSphere%20Online%20Help/RestfulAPIs/StatusAPIs.5.108.html#)
|
||||
@@ -8,7 +8,8 @@ schema: 2.0.0
|
||||
# Invoke-ZertoFailoverRollback
|
||||
|
||||
## SYNOPSIS
|
||||
Rollsback a VPG in a Before Commit Failover State
|
||||
|
||||
Rolls back a VPG in a Before Commit Failover State
|
||||
|
||||
## SYNTAX
|
||||
|
||||
@@ -17,20 +18,23 @@ Invoke-ZertoFailoverRollback [-vpgName] <String[]> [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Rollsback a VPG in a Before Commit Failover State
|
||||
|
||||
Rolls back a VPG in a Before Commit Failover State
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
|
||||
```powershell
|
||||
PS C:\> Invoke-ZertoFailoverRollback -vpgName "MyVpg"
|
||||
```
|
||||
|
||||
Rollsback VPG "MyVPG" from a Before Commit State
|
||||
Rolls back VPG "MyVPG" from a Before Commit State
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -vpgName
|
||||
|
||||
Name(s) of VPG(s) to roll back from failing over
|
||||
|
||||
```yaml
|
||||
@@ -51,9 +55,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
---
|
||||
external help file: ZertoApiWrapper-help.xml
|
||||
Module Name: ZertoApiWrapper
|
||||
online version: https://github.com/wcarroll/ZertoApiWrapper/blob/Master/docs/New-ZertoVpgSettingsIdentifier.md
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# New-ZertoVpgSettingsIdentifier
|
||||
|
||||
## SYNOPSIS
|
||||
Creates and returns a VPG Settings Identifier either for an existing VPG or a new VPG.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
### existingVpg
|
||||
```
|
||||
New-ZertoVpgSettingsIdentifier -vpgIdentifier <String> [<CommonParameters>]
|
||||
```
|
||||
|
||||
### newVpg
|
||||
```
|
||||
New-ZertoVpgSettingsIdentifier [-newVpg] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Creates and returns a VPG Settings Identifier either for an existing VPG or a new VPG.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:> New-ZertoVpgSettingsIdentifier -newVpg
|
||||
```
|
||||
|
||||
Creates a Vpg Settings Identifier for a new, blank VPG.
|
||||
|
||||
### Example 2
|
||||
```powershell
|
||||
PS C:> New-ZertoVpgSettingsIdentifier -vpgIdentifier "MyVpgIdentifier"
|
||||
```
|
||||
|
||||
Creates a Vpg Settings Identifier for an existing VPG. This settings identifier points to a settings object that contains the current settings of the VPG.
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -newVpg
|
||||
Use this switch when creating a vpgSettingsIdentifier for a new VPG
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: newVpg
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -vpgIdentifier
|
||||
Identifier of the VPG to create a VPG settings identifier.
|
||||
If a vpgIdentifier is not provided, a new VPG settings object is created without any configured settings.
|
||||
This would be used for creating a new VPG from scratch.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: existingVpg
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName, ByValue)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### System.String
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
[Zerto REST API VPG Settings End Point Documentation](http://s3.amazonaws.com/zertodownload_docs/Latest/Zerto%20Virtual%20Replication%20Zerto%20Virtual%20Manager%20%28ZVM%29%20-%20vSphere%20Online%20Help/RestfulAPIs/StatusAPIs.5.108.html#)
|
||||
@@ -14,15 +14,13 @@ Deletes a Zerto Virtual Protection Group
|
||||
## SYNTAX
|
||||
|
||||
### vpgIdentifier (Default)
|
||||
|
||||
```PowerShell
|
||||
```
|
||||
Remove-ZertoVpg -vpgidentifier <String[]> [-keepRecoveryVolumes] [-force] [-WhatIf] [-Confirm]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
### vpgName
|
||||
|
||||
```PowerShell
|
||||
```
|
||||
Remove-ZertoVpg [-vpgName] <String[]> [-keepRecoveryVolumes] [-force] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
@@ -164,7 +162,6 @@ Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
Reference in New Issue
Block a user