Skip to content

Instantly share code, notes, and snippets.

@wim-beck
Created January 30, 2018 13:35
Show Gist options
  • Save wim-beck/879900f0ba796589418d156131e47703 to your computer and use it in GitHub Desktop.
Save wim-beck/879900f0ba796589418d156131e47703 to your computer and use it in GitHub Desktop.
# Source: http://virot.eu/get-the-sid-of-all-domains-in-a-forest/
Import-Module ActiveDirectory
(Get-ADForest).Domains| %{Get-ADDomain -Server $_}|select name, domainsid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment