PowerShell is an automated framework that provides system administrators with many capabilities to perform tasks. It supports the scripting language. Every command in the script is called a cmdlet. You can build your own cmdlets using the .NET programming language. An explanation is given here:
To check out a forest, you can use the get-adforest cmdlet, as shown:
To check all the commands type: Get-Command, as shown:
To check the domains, you can use Get-ADDomain, as shown:
To check the trust of the forest, ...