{"id":9040,"date":"2025-07-10T04:27:58","date_gmt":"2025-07-10T04:27:58","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=9040"},"modified":"2025-07-10T04:27:59","modified_gmt":"2025-07-10T04:27:59","slug":"audit-and-detect-existing-edge-brave-and-chrome-extensions-via-intune","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/audit-and-detect-existing-edge-brave-and-chrome-extensions-via-intune","title":{"rendered":"Audit and Detect existing Edge \\ Brave and Chrome Extensions via Intune"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code class=\"\"># Define browser user data paths\n$browsers = @(\n    @{ Name = \"Edge\"; Path = \"$env:LocalAppData\\Microsoft\\Edge\\User Data\" },\n    @{ Name = \"Chrome\"; Path = \"$env:LocalAppData\\Google\\Chrome\\User Data\" },\n    @{ Name = \"Brave\"; Path = \"$env:LocalAppData\\BraveSoftware\\Brave-Browser\\User Data\" }\n)\n\n$results = @()\n# Track processed ExtensionIDs to avoid duplicates\n$processedIds = @{}\n\nforeach ($browser in $browsers) {\n    if (Test-Path $browser.Path) {\n        $profilePaths = Get-ChildItem -Path $browser.Path -Directory | Where-Object { $_.Name -match '^(Default|Profile \\d+)$' } | Select-Object -ExpandProperty FullName\n\n        foreach ($profilePath in $profilePaths) {\n            $extensionPath = \"$profilePath\\Extensions\"\n            if (Test-Path $extensionPath) {\n                Get-ChildItem -Path $extensionPath -Directory | ForEach-Object {\n                    $extId = $_.Name\n                    # Skip excluded IDs and already processed ExtensionIDs\n                    if ($extId -notin $excludeIds -and -not $processedIds.ContainsKey($extId)) {\n                        $manifestPath = \"$extensionPath\\$extId\\*\\manifest.json\"\n                        if (Test-Path $manifestPath) {\n                            $manifest = Get-Content $manifestPath -Raw | ConvertFrom-Json\n                            $name = $manifest.name\n\n                            # Check if name is a localized message (e.g., __MSG_extName__)\n                            if ($name -match '^__MSG_(.+)__$') {\n                                $messageKey = $matches[1]\n                                # Look for messages.json in _locales\/en\/ (default to English)\n                                $localePath = \"$extensionPath\\$extId\\*\\_locales\\en\\messages.json\"\n                                if (Test-Path $localePath) {\n                                    $messages = Get-Content $localePath -Raw | ConvertFrom-Json\n                                    # Get the localized name from messages.json\n                                    if ($messages.$messageKey.message) {\n                                        $name = $messages.$messageKey.message\n                                    } else {\n                                        $name = \"Unknown ($name)\" # Fallback if key not found\n                                    }\n                                } else {\n                                    $name = \"Unknown ($name)\" # Fallback if messages.json not found\n                                }\n                            }\n\n                            # Add ExtensionID to processed list\n                            $processedIds[$extId] = $true\n\n                            [PSCustomObject]@{\n                                Browser = $browser.Name\n                                Profile = ($profilePath -split '\\\\')[-1]\n                                ExtensionID = $extId\n                                Name = $name\n                                Version = $manifest.version\n                                Permissions = $manifest.permissions -join \", \"\n                            }\n                        }\n                    }\n                }\n            }\n        }\n    }\n}\n\n$results | Format-Table -AutoSize<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-9040","post","type-post","status-publish","format-standard","hentry","category-research"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/9040","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=9040"}],"version-history":[{"count":1,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/9040\/revisions"}],"predecessor-version":[{"id":9041,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/9040\/revisions\/9041"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=9040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=9040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=9040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}