Fleet’s built-in queries for collecting and storing important device information.
Apple
Linux
Windows
ChromeOS
Google Chrome profiles
Retrieves the email address of Google Chrome profile on a host.
SELECT
email
FROM google_chrome_profiles
WHERE NOT ephemeral AND email <> ''
$chromeLocalState = "$env:LOCALAPPDATA\Google\Chrome\User Data\Local State"
if (-not (Test-Path $chromeLocalState)) { exit }
$json = Get-Content $chromeLocalState -Raw | ConvertFrom-Json
$profiles = $json.profile.info_cache
foreach ($prop in $profiles.PSObject.Properties.Value) {
$isEphemeral = $false
if ($prop.PSObject.Properties.Name -contains "ephemeral") {
$isEphemeral = $prop.ephemeral
} elseif ($prop.PSObject.Properties.Name -contains "is_ephemeral") {
$isEphemeral = $prop.is_ephemeral
}
$email = $prop.email
if (-not $isEphemeral -and -not [string]::IsNullOrEmpty($email)) {
Write-Output $email
}
}
PowerShell commands are currently work in progress, contributions welcome.
Vitals