From c25941ea83dc8f91212245dc99802afa96ffa28c Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Sun, 10 Mar 2019 22:14:37 -0400 Subject: [PATCH] Create Save-ZertoVpgSettings to Commit VPG Settings Object --- .../Public/Save-ZertoVpgSettings.ps1 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 ZertoApiWrapper/Public/Save-ZertoVpgSettings.ps1 diff --git a/ZertoApiWrapper/Public/Save-ZertoVpgSettings.ps1 b/ZertoApiWrapper/Public/Save-ZertoVpgSettings.ps1 new file mode 100644 index 0000000..157393f --- /dev/null +++ b/ZertoApiWrapper/Public/Save-ZertoVpgSettings.ps1 @@ -0,0 +1,19 @@ +function Save-ZertoVpgSettings { + [cmdletbinding( + SupportsShouldProcess = $true + )] + param( + [Parameter( + HelpMessage = "VpgSettings Identifier to save", + Mandatory = $true, + ValueFromPipeline = $true, + ValueFromPipelineByPropertyName = $true + )] + [string]$vpgSettingsIdentifier + ) + + $baseUri = "vpgsettings/{0}/commit" -f $vpgSettingsIdentifier + if ($PSCmdlet.ShouldProcess("Commiting VPG Settings with Settigns identifier $vpgSettingsIdentifier")) { + Invoke-ZertoRestRequest -uri $baseUri -method "POST" + } +} \ No newline at end of file