-
-
Save HarmJ0y/74556b87c4040638f1599699a26e7b0a to your computer and use it in GitHub Desktop.
AD Forward Link Enumeration
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
$ForwardLinks = [DirectoryServices.ActiveDirectory.ActiveDirectorySchema]::GetCurrentSchema().FindAllClasses() | % { | |
$ClassName = $_.Name | |
$_.MandatoryProperties + $_.OptionalProperties | ? { $_.Link -and ($_.LinkID % 2 -eq 0) } | % { | |
$Output = New-Object PSObject | |
$Output | Add-Member NoteProperty 'ClassName' $ClassName | |
$Output | Add-Member NoteProperty 'PropertyName' $_.Name | |
$Output | Add-Member NoteProperty 'PropertyLink' $_.Link | |
$Output | Add-Member NoteProperty 'PropertyLinkID' $_.LinkID | |
$Output | |
} | |
} | |
$ForwardLinks | ft |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment