How to create NTDS Active Directory Connection Objects with Powershell

Hello there

I need to create 240 replication connectors (NTDS Connection Objects in ADS&S) for the new Windows Server 2008 DCs I am going to deploy.

I am searching a fast scriptable way to create with Powershell modules for AD. I can't find a way to do it.

Can anyone please help me out?

Thank you so much in advance

July 7th, 2011 10:42am

Hi Monaweb,

 

Thanks for posting here.

 

Have you taken look the sample script in the article below:

 

Add AD Site Links from a CSV file

http://gallery.technet.microsoft.com/scriptcenter/e0128121-efc7-436d-91cc-025c0a4a6340

 

Meanwhile, If you have numbers of sites need to be connected , have you also consider to set hub-and-spoke site link topology by using PowerShell?

 

PowerShell to automatically create all AD hub-to-spoke site links

http://blogs.technet.com/b/ashleymcglone/archive/2010/10/06/powershell-to-automatically-create-all-ad-hub-to-spoke-site-links.aspx

 

Regards,

 

Tiger Li

 

TechNet Subscriber Support in forum

If you have any feedback on our support, please contact  tnmff@microsoft.com

Free Windows Admin Tool Kit Click here and download it now
July 8th, 2011 2:46am

Hi Monaweb,

If there is any update on this issue, please feel free to let us know.

We are looking forward to your reply.

Regards,

Tiger Li

TechNet Subscriber Support in forum
If you have any feedback on our support, please contact  tnmff@microsoft.com.

July 11th, 2011 11:01am

I note that the original query asked about creating "...(NTDS Connection Objects in ADS&S)..." but the answer is about creating intersite links.

In AD these are different things. I also would like to script creation of new NTDS connection objects in powershell, but so far I have drawn a blank.

These are visible in ($site.servers).InboundConnections and OutboundConnections but I don't know how to create them.

Free Windows Admin Tool Kit Click here and download it now
July 14th, 2011 8:33am

Hi Monaweb,

If there is any update on this issue, please feel free to let us know.

We are looking forward to your reply.

Regards,

Tiger Li

TechNet Subscriber Support in forum
If you have any feedback on our support, please contact  tnmff@microsoft.co

July 21st, 2011 9:18pm

I was looking for a way to do the same and found this thread.  There is not much out there on how to create one, so after some trial and error I figured out how to create the connection object.  This is a one liner to create an ntdsconnection object.  You will have to write your code to loop through your different sites, but here is the code.  Two years late, but hopefully can help someone else.

New-ADObject-typentdsConnection-Name MyConnectionObject-path"CN=NTDS Settings,CN=8R2RODC1,CN=Servers,CN=RODC-Site,CN=Sites,CN=Configuration,DC=contoso,DC=com"-ProtectedFromAccidentalDeletion$True-OtherAttributes@{options=65; fromServer='CN=DC1,OU=Domain Controllers,DC=contoso,DC=com';enabledConnection=$True}

Free Windows Admin Tool Kit Click here and download it now
July 15th, 2015 8:35am

https://gallery.technet.microsoft.com/scriptcenter/780a2272-06f9-4895-827e-9f56bc9272c4
July 15th, 2015 9:08am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics