- Name:
- [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().Name
- Application Partitions:
- [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().ApplicationPartitions
- Sites:
- [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().Sites
- Global Catalogs:
- [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().GlobalCatalogs
- Domains:
- [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().Domains
- Functional Level:
- [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().ForestMode
- Root Domain:
- [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().RootDomain
- Schema DN/Role:
- [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().Schema
- FSMO - Schema Master:
- [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().SchemaRoleOwner
- FSMO - Domain Naming Master:
- [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().NamingRoleOwner
[Active Directory Domain]:
* If you need this information from the computer's domain you're running this on, switch out GetCurrentDomain() for GetComputerDomain() and all of these will work as well.
* If you need this information from the computer's domain you're running this on, switch out GetCurrentDomain() for GetComputerDomain() and all of these will work as well.
- FSMO - Infrastructure Master:
- [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().InfrastructureRoleOwner
- FSMO - PDC Emulator:
- [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().PdcRoleOwner
- FSMO - RID Master:
- [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().RidRoleOwner
- Domain Controllers:
- [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().DomainControllers
- Functional Level:
- [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().DomainMode
- Domain Parent:
- [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().Parent
- Functional Level:
- [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().DomainMode
- Child Domains:
- [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().Children
- Forest:
- [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().Forest
- Name:
- [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().Name
[Computer Specific]:
- Site:
- [System.DirectoryServices.ActiveDirectory.ActiveDirectorySite]::GetComputerSite()
- User Domain:
- [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().Name
- Computer Domain:
- [System.DirectoryServices.ActiveDirectory.Domain]::GetComputerDomain().Name
No comments:
Post a Comment