How to get a list of systems that have ANY version of a specific app installed?

I am trying to get a list of hostnames that I can put into Excel for systems that have any version of Google Chrome on them. I know I can go to “software” and type in Chrome and pull a list, but the problem is that it returns results in groups, based on the version of Chrome - and there are about 50 different groups/versions… so to get a list of hosts, I’d have to click into each group and copy the hostname.

Is there a way to get a simple list of hosts from Automox that have ANY version of Chrome installed?

use this script, add your ApiKey and ORG ID, then filter by Google Chrome in the Output

$apiKey = ‘’
$orgID = ‘’
$filepath = ‘C:\Temp\SoftwareInventory.csv’

---------------------------

$page = 0
$limit = 500
$servers = @()

Set-Content $filepath -Value “Computer,display_name,version”

$apiInstance = ‘https://console.automox.com/api/
$apiTable = ‘servers’

while($true) {

$orgAndKey = "?o=$orgID&api_key=$apiKey&l=$limit&p=$page"

# Put components together
$uri = $apiInstance + $apiTable + $orgAndKey

$resp = (Invoke-WebRequest -Method GET -Uri $uri -UseBasicParsing).Content | ConvertFrom-Json | Select-Object results

$servers += $resp.results
$page += 1

if($resp.results.count -lt $limit) {
    break
}

}

$servers = $servers | Sort-Object name

Check each server for software

foreach ($server in $servers) {

$serverID = $server.id
$serverName = $server.name

Write-Output $serverName

$orgAndKey = "/$serverID/packages?o=$orgID"

# Put components together
$getURI = $apiInstance + $apiTable + $orgAndKey

$headers = @{ "Authorization" = "Bearer $apiKey" }
$response = (Invoke-WebRequest -Method Get -Uri $getURI -Headers $headers).Content | ConvertFrom-Json

$response | Where-Object {$.display_name -notMatch “Windows|Intel|Update|Microsoft|Alcor|AMD|Avatier|Avaya|Azure|Barracuda|Bloomberg|BlueMatrix|Bomgar|Brother|Canon|Catalyst Control Center|CCC Help|Cisco|Citrix|CompnentOne|CorelDRAW|Dell|FactSett|Firefox|Global Relay|Greenshot|Hewlett|HP|IIS|Konica Minolta|Logitech|LogMeIn|LogRhythm|Market Axess|MarketResearch|Mozilla Firefox|NVIDIA|Panini|Python|Quickbooks|Realtek|Remote Support Jump Client|Samsung|Service Pack|Slack|Sophos|SQL|Surface|Synaptics|Tradeweb|TRAFiX|Visual C|Visual Studio|VLC|VMware” -and $.installed -EQ $true} | Select-Object @{label=“Computer”; Expression= {"$serverName"}},Display_Name,Version `
| Sort-Object Display_Name | Export-Csv -Path $filepath -NoTypeInformation -Append -Force

}

Thanks… that came across in an odd formating. Are you saying that I should just create a ps1 as this:

$orgId = "myorgidhere"
$apiKey = 'myapikeyhere'
$filepath = ‘.\SoftwareInventory.csv’

$page = 0
$limit = 500
$servers = @()

Set-Content $filepath -Value “Computer,display_name,version”

$apiInstance = ‘https://console.automox.com/api/’
$apiTable = ‘servers’

while($true) {
    $orgAndKey = "?o=$orgID&api_key=$apiKey&l=$limit&p=$page"

    # Put components together
    $uri = $apiInstance + $apiTable + $orgAndKey
    
    $resp = (Invoke-WebRequest -Method GET -Uri $uri -UseBasicParsing).Content | ConvertFrom-Json | Select-Object results
    
    $servers += $resp.results
    $page += 1
    
    if($resp.results.count -lt $limit) {
        break
    }
}

$servers = $servers | Sort-Object name

foreach ($server in $servers) {

    $serverID = $server.id
    $serverName = $server.name
    
    Write-Output $serverName
    
    $orgAndKey = "/$serverID/packages?o=$orgID"
    
    # Put components together
    $getURI = $apiInstance + $apiTable + $orgAndKey
    
    $headers = @{ "Authorization" = "Bearer $apiKey" }
    $response = (Invoke-WebRequest -Method Get -Uri $getURI -Headers $headers).Content | ConvertFrom-Json

    $response | Where-Object {$.display_name -notMatch “Windows|Intel|Update|Microsoft|Alcor|AMD|Avatier|Avaya|Azure|Barracuda|Bloomberg|BlueMatrix|Bomgar|Brother|Canon|Catalyst Control Center|CCC Help|Cisco|Citrix|CompnentOne|CorelDRAW|Dell|FactSett|Firefox|Global Relay|Greenshot|Hewlett|HP|IIS|Konica Minolta|Logitech|LogMeIn|LogRhythm|Market Axess|MarketResearch|Mozilla Firefox|NVIDIA|Panini|Python|Quickbooks|Realtek|Remote Support Jump Client|Samsung|Service Pack|Slack|Sophos|SQL|Surface|Synaptics|Tradeweb|TRAFiX|Visual C|Visual Studio|VLC|VMware” -and $.installed -EQ $true} | Select-Object @{label=“Computer”; Expression= {"$serverName"}},Display_Name,Version `
| Sort-Object Display_Name | Export-Csv -Path $filepath -NoTypeInformation -Append -Force

}

and run it? If so, error result as:

The term ‘$.display_name’ is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Basically is this script

i just add this in the last $response line to filter some Apps in the report:

$response | Where-Object {$.display_name -notMatch “Windows|Intel|Update|Microsoft|Alcor|AMD|Avatier|Avaya|Azure|Barracuda|Bloomberg|BlueMatrix|Bomgar|Brother|Canon|Catalyst Control Center|CCC Help|Cisco|Citrix|CompnentOne|CorelDRAW|Dell|FactSett|Firefox|Global Relay|Greenshot|Hewlett|HP|IIS|Konica Minolta|Logitech|LogMeIn|LogRhythm|Market Axess|MarketResearch|Mozilla Firefox|NVIDIA|Panini|Python|Quickbooks|Realtek|Remote Support Jump Client|Samsung|Service Pack|Slack|Sophos|SQL|Surface|Synaptics|Tradeweb|TRAFiX|Visual C|Visual Studio|VLC|VMware” -and $.installed -EQ $true} | Select-Object @{label=“Computer”; Expression= {"$serverName"}},Display_Name,Version `