Skip to content

Instantly share code, notes, and snippets.

@tom-henderson
Created September 4, 2018 03:49
Show Gist options
  • Save tom-henderson/a102eb374890c3dda8941fa958c9b78e to your computer and use it in GitHub Desktop.
Save tom-henderson/a102eb374890c3dda8941fa958c9b78e to your computer and use it in GitHub Desktop.
function Get-GPClientSideExtensions {
Get-ChildItem "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\GPExtensions" | foreach {
$guid = ($_.Name).Split(“\”) | Select -Last 1
$props = Get-ItemProperty $_.PSPath
# Guessing CSE name in order (default), ProcessGroupPolicy, ProcessGroupPolicyEx
if ($props.'(default)') {
$description = $props.'(default)'
} elseif ($props.ProcessGroupPolicy) {
$description = $props.ProcessGroupPolicy
} elseif ($props.ProcessGroupPolicyEx) {
$description = $props.ProcessGroupPolicyEx
} elseif ($gpeGuid = "{35378EAC-683F-11D2-A89A-00C04FBBCFA2}") {
$description = "Administrative Templates"
} else {
$description = "Error guessing CSE name"
}
[PSCustomObject] @{
GUID = $guid
Description = $gpeName
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment