Jump to content

Specify Dc When Adding A Domain User


Adrian

Recommended Posts

Hi together it's me again,


 


I'm still programming a Script for automatic Creation of Domain Users and I wanted to ask, if it's possible to define the Domain Controller from which the "Add-IpPbxUserWindowsAccount" - Cmdlet reads the User Information from.


 


My problem is, that my new User Account is created on DC1 at location 1.


Now I want to add this Windows Account to my Swyx Account at Location 2.


While my newly created Account from Location 1 isn't already replicated to my DC on Location 2 the Swyx Server can't find the specified Account.


Link to comment
Share on other sites


AD Replication intervall is 15 minutes, but I don't really want to set my script to sleep for that time period and also I don't want to set a shorter period for replication.


 


The reason for location 1 is, that I create all the AD Accounts via remote Powershell Session on our Exchange Server which is at location 1. Within this remote session I can access all modules and cmdlets (AD / Exchange etc.) I need.


If I will create the AD Account at Location 2 where the Swyx Server can find it, my Exchange Server at Location 1 would have to wait for AD replication.


 


In my oppinion the only solutions are:


 


- do the "Add-IpPbxUserWindowAccount" Cmdlet with specified DC


or


- force an AD Replication.


 


Isn't there any possibility to set the DC for that Command? :(


Link to comment
Share on other sites


The "Sync-ADObject" works perfectly for this task.


Right after creating the AD User Account, I'm syncing that Object between my DC1s and pause the script via "Start-Sleep" for 10 seconds.


After this break both DCs at Location 2 have synced the User Account.


 


Thanks srom


Link to comment
Share on other sites


Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.