Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
param(
[string]$UserDataDir="C:\\Workspace\\chrome\\dev_user_dir"
)
$localStateJson = Get-Content "$UserDataDir\\Local State"
$localState = $localStateJson | ConvertFrom-Json
$profileKeys = $localState.profile.info_cache | Get-Member | ? {$_.MemberType -eq "NoteProperty"}
$infoCache = $localState.profile.info_cache
$allEntries = @()
ForEach($key in $profileKeys) {
$profile = $key.Name
$profileDisplayName = $infoCache."$profile".name
$newEntry = @{
Profile=$profile;
Name=$profileDisplayName;
};
$allEntries += $newEntry
}
$allEntries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment