[System.String]$strUsername="service-account-name";
[System.String]$strHostFQDN="orchestrator.cloudbuildtools.com";
[System.String]$strUri="https://$strHostFQDN/vco/api/workflows?maxResult=10&startIndex=0&queryCount=false";
[System.Management.Automation.PSCredential]$objPSCredential=$Host.UI.PromptForCredential("Enter the service account password","Enter the service account password",$strUsername,"");
[System.Management.Automation.PSCredential]$objPSCredential=Get-Credential-UserName$strUsername-Message"Enter the service account password"-Title"Enter the service account password";
[Microsoft.PowerShell.Commands.BasicHtmlWebResponseObject]$objBasicHtmlWebResponseObject=Invoke-WebRequest-Method Get-Uri$strUri-Authentication Basic-Credential$objPSCredential-SslProtocol Tls12-ConnectionTimeoutSeconds15-OperationTimeoutSeconds30-ContentType"application/json"-SkipCertificateCheck-SkipHeaderValidation;
Write-Host$objBasicHtmlWebResponseObject.Content;Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
