O'Reilly logo

Mastering PowerCLI by Sajal Debnath

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Invoke-RestMethod cmdlet

The Invoke-RestMethod is the PowerShell cmdlet using which we can send an HTTP or HTTPS request to a RESTful Web service. This is the single most important cmdlet for this chapter, as we are going to manage the REST APIs of vRealize Automation using this cmdlet. The syntax for the cmdlet is as follows:

Invoke-RestMethod [-Uri] <Uri> [-Body <Object>] [-Certificate 
<X509Certificate>] [-CertificateThumbprint <String>] [-ContentType 
<String>] [-Credential <PSCredential>] [-DisableKeepAlive] [-Headers 
<IDictionary>] [-InFile <String>] [-MaximumRedirection <Int32>] [-
Method <WebRequestMethod>] [-OutFile <String>] [-PassThru] [-Proxy 
<Uri>] [-ProxyCredential <PSCredential>] [-
ProxyUseDefaultCredentials] [-SessionVariable ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required