Skip to content

Instantly share code, notes, and snippets.

@seanosullivanuk
Created November 17, 2020 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seanosullivanuk/d9b1d90541df78dafc60267bde86a500 to your computer and use it in GitHub Desktop.
Save seanosullivanuk/d9b1d90541df78dafc60267bde86a500 to your computer and use it in GitHub Desktop.
List all Active Directory user accounts that have their security inheritance disabled
Get-ADUser -SearchBase "OU=Users,DC=internal,DC=example,DC=co,DC=uk" -Filter * -Properties nTSecurityDescriptor | ?{ $_.nTSecurityDescriptor.AreAccessRulesProtected -eq "True" }
@seanosullivanuk
Copy link
Author

Found this useful when a few AD accounts couldn't successfully reset passwords via AAD Writeback.

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