Created
February 8, 2019 13:25
-
-
Save ypcode/039fc6f32b0b48e20e6cfd9e5610666f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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