Chrome Extension Scanner Script

Thanks to some reddit users, This cool powershell script gets all chrome extensions from all users.
Nice for finding bad extensions and what to delete, without interrupting the users.

# https://www.reddit.com/r/PowerShell/comments/5px71w/getting_chrome_extensions/

function Get-ChromeExtension {
    param (
        [string]$ComputerName = $env:COMPUTERNAME
    )

    Get-ChildItem "\\$ComputerName\c$\users\*\appdata\local\Google\Chrome\User Data\Default\Extensions\*\*\manifest.json" -ErrorAction SilentlyContinue | % {
        $path = $_.FullName
        $_.FullName -match 'users\\(.*?)\\appdata' | Out-Null
        Get-Content $_.FullName -Raw | ConvertFrom-Json | select @{n='ComputerName';e={$ComputerName}}, @{n='User';e={$Matches[1]}}, Name, Version, @{n='Path';e={$path}}
    }
}
Get-ChromeExtension | ? name -notmatch '__msg_' | sort user, name, {[version]$_.version}
1 Like