Below script would help you to get the list of all Sites & Servcies from AD Sites & Servcies.
$list = 'C:\temp\subnets.txt'
$nc = ([adsi]'LDAP://RootDSE').ConfigurationNamingContext
$base = "cn=subnets,cn=sites,$nc"
$fltr = '(objectClass=subnet)'
Get-ADObject -LDAPFilter $fltr -SearchBase $base -SearchScope Subtree -Properties * |
Select-Object Name, Location, Description, @{n='Type';e={$_.objectClass}},
@{n='Site';e={(Get-ADObject $_.siteObject -Properties *).Name}} |
Export-Csv $list -Delimiter "`t" -Encoding UTF8
$list = 'C:\temp\subnets.txt'
$nc = ([adsi]'LDAP://RootDSE').ConfigurationNamingContext
$base = "cn=subnets,cn=sites,$nc"
$fltr = '(objectClass=subnet)'
Get-ADObject -LDAPFilter $fltr -SearchBase $base -SearchScope Subtree -Properties * |
Select-Object Name, Location, Description, @{n='Type';e={$_.objectClass}},
@{n='Site';e={(Get-ADObject $_.siteObject -Properties *).Name}} |
Export-Csv $list -Delimiter "`t" -Encoding UTF8