Get-ADForest

From UVOO Tech Wiki
Revision as of 23:28, 10 June 2021 by Busk (talk | contribs) (Created page with "# Get your ad domain $DomainName = (Get-ADDomain).DNSRoot # Get all DC's $AllDCs = Get-ADDomainController -Filter * -Server $DomainName | Select-Object Hostname,Ipv4address,i...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Get your ad domain

$DomainName = (Get-ADDomain).DNSRoot

# Get all DC's

$AllDCs = Get-ADDomainController -Filter * -Server $DomainName | Select-Object Hostname,Ipv4address,isglobalcatalog,site,forest,operatingsystem

Or

$AllDCs = (Get-ADForest).GlobalCatalogs