Sample script that searches Active Directory for all the sites in a forest.

PowerShell
Edit|Remove
$objForest = [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest() 
$objForest.Sites | Select-Object Name