Hello,
we migrated from old to new AD environment ,need to check all the custom attribute list including any extension custom attribute so that same can be created in new environment.
I couldn't find any script that work well ,I tried below commands but it threw all custom attribute including all default custom attribute
Import-Module ActiveDirectory
$schemaPath = "CN=Schema,CN=Configuration,DC=mydomain,DC=com"
Retrieve all attribute schema objects from the schema container
$customAttributes = Get-ADObject -SearchBase $schemaPath -LDAPFilter "(&(objectClass=attributeSchema)(!isDefunct=TRUE)(!systemFlags:1.2.840.113556.1.4.803:=16))" -Property name |Where-Object { $_.name -notlike "ms-*" } |Select-Object -ExpandProperty name
$customAttributes
may be I am missing something .
just wants custom attributes created by users or modified by any users.
Thanks
Rich