Skip to main content
Question

installed updstes report


Forum|alt.badge.img

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 

Forum|alt.badge.img+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


jack.smith
Forum|alt.badge.img+1

@curioustoknow you could try this code. 

 

# 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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings