PoshCode Archive  Artifact [d38a6b371f]

Artifact d38a6b371fb0e87af9aa20f185f12fcd08c6c013125035866617de17eeb48463:

  • File List-AD-Attributes.ps1 — part of check-in [1d4a83a386] at 2018-06-10 12:56:43 on branch trunk — List active directory attributes from schema (user: unknown size: 666)

# encoding: ascii
# api: powershell
# title: List AD Attributes
# description: List active directory attributes from schema
# version: 0.1
# license: CC0
# x-poshcode-id: 1241
# x-archived: 2009-08-02T06:49:17
#
#
$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
   }
   "#################################"
}