# encoding: ascii
# api: powershell
# title: List AD Attributes
# description: List active directory attributes from schema
# version: 0.1
# author: BSonPosh
# license: CC0
# x-poshcode-id: 2754
# x-archived: 2011-07-06T05:04:14
# x-published: 2011-06-28T05:44:00
#
#
$forest = [DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest()
$Schema = $forest.schema
$Properties = $Schema.FindAllProperties()
foreach($property in $Properties)
{
"#################################"
"Name: {0}" -f $property.Name
"Link: {0}" -f $property.link
"LinkID: {0}" -f $property.linkid
if(!$?)
{
"Error: {0}" -f $error[0].message
}
"#################################"
}