PoshCode Archive  Artifact [b3302f3ca0]

Artifact b3302f3ca0873a6dd5083a515bf7948de932bd89fa5a8e41b3816e8e4997e436:

  • File List-AD-Attributes.ps1 — part of check-in [5c3835c78a] at 2018-06-10 13:15:17 on branch trunk — List active directory attributes from schema (user: BSonPosh size: 722)

# 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: 2753
# x-archived: 2011-07-06T05:04:09
# x-published: 2011-06-28T05:43: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
   }
   "#################################"
}