Skip to content

Commit

Permalink
Merge pull request #175 from mponton/mponton-patch-json-encoding
Browse files Browse the repository at this point in the history
Use ConvertTo-Json in Connect-vRAServer
  • Loading branch information
chelnak authored Feb 22, 2018
2 parents 655d6f6 + 1ef78f7 commit d2c7402
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/Functions/Public/Connect-vRAServer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,11 @@
try {

# --- Create Invoke-RestMethod Parameters
$JSON = @"
{
"username":"$($Username)",
"password":"$($JSONPassword)",
"tenant":"$($Tenant)"
}
"@
$JSON = @{
username = $Username
password = $JSONPassword
tenant = $Tenant
} | ConvertTo-Json

$Params = @{

Expand Down Expand Up @@ -197,4 +195,4 @@

Write-Output $vRAConnection

}
}

0 comments on commit d2c7402

Please sign in to comment.