[System.String]$strUsername = "service-account-name";
[System.String]$strHostFQDN = "orchestrator.cloudbuildtools.com";
[System.String]$strAccessUri = "https://$strHostFQDN)/iaas/api/login";
[System.Collections.Hashtable]$objHashtable = @{"refreshToken" = $strRefreshToken }
[System.Management.Automation.PSObject]$objPSObjectRequest = New-Object -TypeName PSObject -Property $objHashtable
[System.String]$strJson = ConvertTo-Json -InputObject $objPSObjectRequest -Compress;
[System.Management.Automation.PSObject]$objPSObjectReturn = Invoke-RestMethod $strAccessUri -Method POST -ContentType "application/json" -Body $strJson -SkipCertificateCheck -SkipHeaderValidation;
[System.String]$strAccessToken = $objPSObjectReturn.tokenType + " " + $objPSObjectReturn.tokenDiscover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
