How do you generate a report of installed updates on app systems for a certain period of time ( 1 month up to 1 year) for adding purpose
Page 1 / 1
Hello curiostoknow,
Have you taken a look at the activity log?
You can specify a custom date range, and then add additional filters based on the policy type.
Also, you can export to a CSV file if you want to drill down further in Excel.
https://console.automox.com/reports/activity-log
# Automox API Parameters
$apiKey = Read-Host 'api-key'
$orgID = Read-Host 'orgID'
$headers = @{ "Authorization" = "Bearer $apiKey" }
# Get Policy Results
$policy = Read-Host 'PolicyID' # Patch Policy of Choice
$date = (Get-Date).AddMonths(-12)
$start = Get-Date $date -f 'yyyy-MM-dd'
$end = Get-Date -f 'yyyy-MM-dd'
$i = 0
$data = do{
$url = "https://console.automox.com/api/events?o=$orgID&policyId=$policy&limit=500&page=$i&startDate=$start&endDate=$end"
$response = (Invoke-WebRequest -Method Get -Uri $url -Headers $headers).Content | ConvertFrom-Json
$response | % {
$text = $_.data.text -split "`n"
$device = $_.server_name
pscustomobject] @{
device = $device
policy = $_.policy_name
log = $text
}
}
$i++
}
while ($response)
$data | Export-Csv C:\patching.csv -NoTypeInformation
Reply
Login to the community
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.