Contact Info

Crumbtrail » Administration » Powershell » Powershell 3.0 » Invoke-RestMethod

Invoke-RestMethod - Powershell 3.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »


Short description
Sends an HTTP or HTTPS request to a RESTful web service.

Invoke-RestMethod [-Uri] <Uri> [-Body <Object>] [-Certificate <X509Certificate>] [-CertificateThumbprint <String>] [-Co
ntentType <String>] [-Credential <PSCredential>] [-DisableKeepAlive] [-Headers <IDictionary>] [-InFile <String>] [-Maxi
mumRedirection <Int32>] [-Method <WebRequestMethod>] [-OutFile <String>] [-PassThru] [-Proxy <Uri>] [-ProxyCredential <
PSCredential>] [-ProxyUseDefaultCredentials] [-SessionVariable <String>] [-TimeoutSec <Int32>] [-TransferEncoding <Stri
ng>] [-UseDefaultCredentials] [-UserAgent <String>] [-WebSession <WebRequestSession>] [<CommonParameters>]

The Invoke-RestMethod cmdlet sends HTTP and HTTPS requests to Representational State Transfer (REST) web services that 
returns richly structured data.

Windows PowerShell formats the response based to the data type. For an RSS or ATOM feed, Windows PowerShell returns the
 Item or Entry XML nodes. For JavaScript Object Notation (JSON) or XML, Windows PowerShell converts (or deserializes) t
he content into objects.

This cmdlet is introduced in Windows PowerShell 3.0.