Get AD Group Member Details from Trusted Domains

Posted on Posted in Active Directory, Powershell

The vast majority of active directory powershell cmdlets don’t need any enhancement but there is one in particular that I felt could use an alteration:  Get-ADGroupMember.  When using this command it will return [Microsoft.ActiveDirectory.Management.ADObject] types which can be thrown to a switch statement depending on objectclass and you will get the object’s home AD info.  However, when dealing with multiple domains the basic output can become a PITA to decipher.  Initially I wanted a custom attribute containing just the object’s home domain FQDN for sorting/sum reasons but settled on a hybrid report where both the home FQDN and the home AD object details are returned:  Get-ADGroupMemberEnhanced