From ad2073f404011081cdbb53ff6c1be736a0e42ed8 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Tue, 7 Apr 2020 10:27:22 -0400 Subject: [PATCH] Fixed submitted body formatting --- ZertoApiWrapper/Public/Set-ZertoUserCredential.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ZertoApiWrapper/Public/Set-ZertoUserCredential.ps1 b/ZertoApiWrapper/Public/Set-ZertoUserCredential.ps1 index c2e1a9e..110be91 100644 --- a/ZertoApiWrapper/Public/Set-ZertoUserCredential.ps1 +++ b/ZertoApiWrapper/Public/Set-ZertoUserCredential.ps1 @@ -19,8 +19,10 @@ function Set-ZertoUserCredential { process { $uri = '/localsite/virtualizationsettings' $body = @{ - UserName = $UserCredential.UserName - Password = $UserCredential.GetNetworkCredential().Password + Credentials = @{ + UserName = $UserCredential.UserName + Password = $UserCredential.GetNetworkCredential().Password + } } if ( $PSCmdlet.ShouldProcess( $script:zvmServer, "Updating hypervisor service account credentials" )) { Invoke-ZertoRestRequest -uri $uri -Method PUT -body ($body | ConvertTo-Json)