I’ve been investigating the viability of logging from PowerShell scripts to Loggly, and I came across their “Send Sample Data to Loggly” intro page. They instruct Windows users to install and use cURL to send their data to the API, but this isn’t necessary if you have PowerShell 3.0 or newer.
Just run the following one-liner in a PowerShell console window:
(wget "http://www.loggly.com/install/LogglySample.log").RawContent | iwr -Method Post -Uri "https://logs-01.loggly.com/bulk/CUSTOMER_TOKEN/tag/sample" -ContentType "text/plain"
Note: ‘iwr’ and ‘wget’ as used above are both aliases for the Invoke-WebRequest cmdlet: