Powershell – AD Object Get Information From Attributes Tab

So you want to use PowerShell to get an attribute out off the Attribute Editor

 

#Get List of OUs in domain
$OUList = Get-ADObject -Filter {ObjectClass -eq "organizationalunit"} -properties *
#For each OU lets find if there are an OUs that have the uPNSuffixes Attribute set
foreach ($item in $OUList)
{
  $OU = [ADSI]"LDAP://$($item.distinguishedname)"  
  $OU."uPNSuffixes"
  $OU."Description"
}
#NOTE if you spell the attribute wrong or the attribute does not exist on the object it will return an overload definition or blank

 

ss

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.