# Forest Mappings

## Get Details about the Current Forest

```powershell
# AD Module
Get-ADForest
Get-ADForest -Identity lab.local

# PowerView
Get-NetForest
Get-NetForest -Forest lab.local
```

## Get All Domains in the Current Forest

```powershell
# AD Module
(Get-ADForest).Domains

# PowerView
Get-NetForestDomain
Get-NetForestDomain -Forest lab.local
```

## Get All Global Catalogs for the Current Forest

```powershell
# AD Module
Get-ADForest | Select -ExpandProperty GlobalCatalogs

# PowerView
Get-NetForestCatalog
Get-NetForestCatalog -Forest lab.local
```

## Map Trusts of a Forest

```powershell
# AD Module
Get-ADTrust -Filter 'msDS-TrustForestTrustInfo -ne "$null"'

# PowerView
Get-NetForestTrust
Get-NetForestTrust -Forest lab.local
```

## Map All Trusts in Current Forest

```powershell
# PowerView
Get-NetForestDomain |  Get-NetDomainTrust
```
