get AD group path in the domain/tree
2 ways so far:
- canonical name:
get-adgroup -identity "your group" -properties canonicalname | sel -property canonicalname [enter]
canonicalname
Your.Domain/ou name/ou name/your group
-
using the distinguishedname:
$group = get-adgroup identity "your group" [enter]
($group.DistinguishedName -split"," ,2)[1] [enter] ou=name,ou,name,dc=your,dc=domain,dc=tld
sorry, I do not seem to get the right formatting, but you get the picture.