59a0a53812
* Establish a help system * Continue to update Help System * Update Get-ZertoAlert.md * Update Get-ZertoDatastore.md * Add Link to Zerto API for Datastores * Update Get-ZertoLicense.md * Update Links to Zerto API documentation * Update the Readme Information * Continue to update README * Update README * Update README.md * Update Help Markdown Files * Correct API URL * Update ZertoApiWrapper-help.xml * Update Get-ZertoProtectedVm.md * Update Help Markdown files * Update Get-ZertoVpgSetting.md * Added online url to each help object. * Update Help Markdown Files * Update ZertoApiWrapper-help.xml
36 lines
943 B
PowerShell
36 lines
943 B
PowerShell
<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #>
|
|
function Checkpoint-ZertoVpg {
|
|
[cmdletbinding()]
|
|
param(
|
|
[Parameter(
|
|
Mandatory = $true,
|
|
HelpMessage = "Name of the VPG to tag."
|
|
)]
|
|
[string]$vpgName,
|
|
[Parameter(
|
|
Mandatory = $true,
|
|
HelpMessage = "Text to tag the checkpoint with."
|
|
)]
|
|
[string]$checkpointName
|
|
)
|
|
|
|
begin {
|
|
$baseUri = "vpgs"
|
|
$vpgIdentifier = $(get-zertovpg -name $vpgName).vpgIdentifier
|
|
$body = @{"checkpointName" = $checkpointName}
|
|
}
|
|
|
|
process {
|
|
if ($vpgIdentifier) {
|
|
$uri = "{0}/{1}/Checkpoints" -f $baseUri, $vpgIdentifier
|
|
Invoke-ZertoRestRequest -uri $uri -body $($body | ConvertTo-Json) -method "POST"
|
|
} else {
|
|
Write-Output "Cannot find VPG named $vpgName. Please check the name and try again."
|
|
}
|
|
}
|
|
|
|
end {
|
|
|
|
}
|
|
}
|