I am running the “List All Devices” API GET command in a PowerShell script that looks like this:
$apiKey = '<MyAPIKey>'
$headers = @{ "Authorization" = "Bearer $apiKey" }
$url = "https://console.automox.com/api/servers?o=106231&page=0&limit=500"
$response = (Invoke-WebRequest -Method Get -Uri $url -Headers $headers).Content
I am running the script from a powershell window as: .\ListAllDevices.ps1
It completes, but I have no idea where the output goes.
I would like to have the data dump to a .csv file on my desktop. How do I make that happen?