Create Function and related files
Remove-ZertoVpgSettingsIdentifier
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #>
|
||||
function Remove-ZertoVpgSettingsIdentifier {
|
||||
[CmdletBinding(SupportsShouldProcess = $true)]
|
||||
param (
|
||||
# Settings Identifier to Remove
|
||||
[Parameter(HelpMessage = "VpgSettingsIdentifier to Delete", Mandatory)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string[]]
|
||||
$vpgSettingsIdentifier
|
||||
)
|
||||
|
||||
begin {
|
||||
}
|
||||
|
||||
process {
|
||||
foreach ($id in $vpgSettingsIdentifier) {
|
||||
if ($PSCmdlet.ShouldProcess($id)) {
|
||||
$uri = "vpgSettings/{0}" -f $id
|
||||
Invoke-ZertoRestRequest -uri $uri -method "DELETE"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
end {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user