From b0d68ea22406982a4da9f1386eb87eddbd244aa5 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Tue, 5 May 2020 16:29:56 -0400 Subject: [PATCH] Updete to use process block for pipeline --- ZertoApiWrapper/Public/Save-ZertoVpgSetting.ps1 | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ZertoApiWrapper/Public/Save-ZertoVpgSetting.ps1 b/ZertoApiWrapper/Public/Save-ZertoVpgSetting.ps1 index 64c9127..6f06b40 100644 --- a/ZertoApiWrapper/Public/Save-ZertoVpgSetting.ps1 +++ b/ZertoApiWrapper/Public/Save-ZertoVpgSetting.ps1 @@ -15,8 +15,16 @@ function Save-ZertoVpgSetting { [string]$vpgSettingsIdentifier ) - $baseUri = "vpgsettings/{0}/commit" -f $vpgSettingsIdentifier - if ($PSCmdlet.ShouldProcess("Commiting VPG Settings with Settigns identifier $vpgSettingsIdentifier")) { - Invoke-ZertoRestRequest -uri $baseUri -method "POST" + Begin { + } + + Process { + $baseUri = "vpgsettings/{0}/commit" -f $vpgSettingsIdentifier + if ($PSCmdlet.ShouldProcess("Commiting VPG Settings with Settigns identifier $vpgSettingsIdentifier")) { + Invoke-ZertoRestRequest -uri $baseUri -method "POST" + } + } + + End { } }