Link to home
Start Free TrialLog in
Avatar of Indyrb
IndyrbFlag for United States of America

asked on

Active Directory Sites and Services Script

I am looking for a way to complete a inventory of all properties in Active Directory Sites and Services and Export to Excel

Essentially I want the following data

SiteName,  Subnet, Server, Name of Server and IP address - Some sites have more than 1 server, and more than 1 subnet.

Also would like to get Site-Link for appropriate Site, and partner. with replication cost and interval

I have windows 2003 and Windows 2008 domain controllers.
Don't appear to have AD DS Web

I found a dsquery command, but it doesn't appear to work

dsquery site -o rdn -limit 0 > c:\folder\all.sites.txt
for /F %A in (c:\folder\all.sites.txt) do For /F %X in (‘dsquery subnet -site %A -o rdn’) do echo %A,%X >> c:\folder\sites.subnets.csv
for /F %A in (c:\folder\all.sites.txt) do For /F %X in (‘dsquery server -site %A -o rdn’) do echo %A,%X >> c:\folder\sites.Servers.csv
SOLUTION
Avatar of becraig
becraig
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial