This script will export a list of all Site and Subnets and the domain controllers in them.
[cmdletbinding()] param() $Sites = [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().Sites $obj = @() foreach ($Site in $Sites) { $obj += New-Object -Type PSObject -Property ( @{ "SiteName" = $site.Name "SubNets" = $site.Subnets -Join ";" "Servers" = $Site.Servers -Join ";" } ) } $obj | Export-Csv 'C:\sites.csv' -NoType
![Share on Facebook Facebook](http://computercrashers.co.uk/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/facebook.png)
![Share on Twitter twitter](http://computercrashers.co.uk/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/twitter.png)
![Share on Google+ google_plus](http://computercrashers.co.uk/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/google_plus.png)
![Share on Linkedin linkedin](http://computercrashers.co.uk/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/linkedin.png)
![feather](http://computercrashers.co.uk/wp-content/plugins/social-media-feather/synved-social/image/icon.png)