Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

New Relic API call from windows powershell v5.1.*



I am trying to run below curl command in windows Powershell 5.1.* to get an xml response for below API. I am receiving error when trying to add metrics detail as below using -i -g -d ‘*****’. Could you please help what is missing here if I have to run this API command on windows Powershell?

curl -uri -Headers @{“x-api-key”=“secretkey”} -ContentType “application/xml” -i -G -d ‘names[]=EndUser&from=2018-0


Hi, @ABhagyanathan: In PowerShell, curl is an alias for Invoke-WebRequest . You will have to replace the curl switches (-i -G -d) with the Invoke-WebRequest equivalents.