Created
October 5, 2018 20:47
-
-
Save raspi/7752a156e1860c8fbfd0ccd81f48dffd 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
$items = Get-ItemProperty -Path 'Registry::HKey_Local_Machine\Software\Microsoft\Windows NT\CurrentVersion\ProfileList\*' | |
Foreach ($item in $items) { | |
$objUser = New-Object System.Security.Principal.SecurityIdentifier($item.PSChildName) | |
$objName = $objUser.Translate([System.Security.Principal.NTAccount]) | |
$item.PSChildName = $objName.value | |
} | |
Write-Output $items | Select-Object -Property PSChildName, ProfileImagePath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment