Link to home
Start Free TrialLog in
Avatar of tiras gans
tiras gansFlag for United States of America

asked on

Powershell command to see all the domain/forest info

This one always frustrate me.  Simple command to see all the domain or forest details. And it doesn't show the list all the servers or sites.  
For example: Get-ADDomain | Format-List
Gives me
ReplicaDirectoryServers            : {server1.company.com, server2.company.com, server3.company.com, server4.company.com...}   how to get all servers?

Same for this:  Get-ADForest | Format-List

Gives me:
GlobalCatalogs        : {server1.company.com, server2.company.com, server3.company.com, server4.company.com...}  how to get all servers?
Sites                 : {site1, site2, site3, site4...} how to get all sites?

I'm probably missing something very simple.  Just annoying issue!
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
EXPERT CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tiras gans

ASKER

I knew I had to narrow it down.  Didn't know how.  
Thanks guys!
Also, look at the Get-ADDomain and Get-ADForest part of the sample report in this article
https://www.experts-exchange.com/articles/33488/Computer-Audit-with-Powershell.html?headerLink=workspace_article