Files
ZertoApiWrapper/ZertoApiWrapper/Public/Checkpoint-ZertoVpg.ps1
T
Wes Carroll 59a0a53812 Help system (#4)
* 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
2019-03-06 20:50:14 -05:00

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 {
}
}