Files
ZertoApiWrapper/ZertoApiWrapper/Public/Stop-ZertoFailoverTest.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

37 lines
1.1 KiB
PowerShell

<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #>
function Stop-ZertoFailoverTest {
[cmdletbinding()]
param(
[Parameter(
HelpMessage = "Name(s) of VPG(s) to stop testing.",
Mandatory = $true
)]
[string[]]$vpgName,
[Parameter(
HelpMessage = "Was the test successful? True or False. True is Default."
)]
[bool]$failoverTestSuccess = $true,
[Parameter(
HelpMessage = "Free text field for any notes to add to the test report."
)]
[string]$failoverTestSummary = "Stop Failover Test for $vpgName"
)
begin {
$baseUri = "vpgs"
$body = @{"FailoverTestSuccess" = $failoverTestSuccess; "FailoverTestSummary" = $failoverTestSummary}
}
process {
foreach ($name in $vpgName) {
$vpgId = $(Get-ZertoVpg -name $name).vpgIdentifier
$uri = "{0}/{1}/FailoverTestStop" -f $baseUri, $vpgId
Invoke-ZertoRestRequest -uri $uri -method "POST" -body $($body | ConvertTo-Json)
}
}
end {
#Nothing to do
}
}