How to export subnet in a specified Sites?
Active Directory Sites and Services doesn’t provide this, it doesn’t have an export option, so I come to think in mind if there’s no GUI provide, it can by using PowerShell
.
So here is the script, just copy paste to text editor and save it using .ps1 extension.
$siteName = "Default-First-Site-Name"
$configNCDN = (Get-ADRootDSE).ConfigurationNamingContext
$siteContainerDN = ("CN=Sites," + $configNCDN)
$siteDN = "CN=" + $siteName + "," + $siteContainerDN
$siteObj = Get-ADObject -Identity $siteDN -properties "siteObjectBL", "description", "location"
foreach ($subnetDN in $siteObj.siteObjectBL) {
Get-ADObject -Identity $subnetDN -properties "siteObject", "description", "location"
}
Find more at : http://blogs.msdn.com/b/adpowershell/archive/2009/08/18/active-directory-powershell-to-manage-sites-and-subnets-part-3-getting-site-and-subnets.aspx