Skip to content

Instantly share code, notes, and snippets.

@dgosbell
Last active May 25, 2021 19:55
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dgosbell/166c0f63da9bae80ad25 to your computer and use it in GitHub Desktop.
Save dgosbell/166c0f63da9bae80ad25 to your computer and use it in GitHub Desktop.
## the following lists all the constrained delegation settings for a given AD user
## adapted from http://www.harbar.net/archive/2015/06/02/Configuring-Kerberos-Constrained-Delegation-with-Protocol-Transition-and-the-Claims.aspx
## to get ActiveDirectory Powershell module on Win 10 use the following
## https://gallery.technet.microsoft.com/Install-the-Active-fd32e541
Param(
[Parameter(Mandatory=$true, Position=0, HelpMessage="AD Account Name")]
[string]$account
)
import-module ActiveDirectory
$u = get-aduser $account -properties "msDS-AllowedToDelegateTo", ServicePrincipalNames
"`n======= SPNs ======="
$u.ServicePrincipalNames | sort
"`n======= Constrained Delegation ======="
$u."msDS-AllowedToDelegateTo" | sort
@pierre69f
Copy link

Thank you Darren.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment