Adrian Posted September 11, 2015 #1 Share Posted September 11, 2015 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 More sharing options...
Most Valued User srom Posted September 12, 2015 Most Valued User #2 Share Posted September 12, 2015 You should Check the Ad Replication. An Wordaround create the Account on DC Location 2 Link to comment Share on other sites More sharing options...
Adrian Posted September 15, 2015 Author #3 Share Posted September 15, 2015 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 DCor- force an AD Replication. Isn't there any possibility to set the DC for that Command? Link to comment Share on other sites More sharing options...
Most Valued User srom Posted September 15, 2015 Most Valued User #4 Share Posted September 15, 2015 You can install Swyx Powershell and Admin on DC Location 1.OR your Script Starts an Ad Rep with PS Link to comment Share on other sites More sharing options...
Adrian Posted September 16, 2015 Author #5 Share Posted September 16, 2015 Hmm, I don't want to install the software on my DC. I think I'll try the AD replication. Because it's only the newly created AD user I have to replicate, I'll try the "Sync-ADObject" - Cmdlet. I let you know, if that was the clue ;-) Link to comment Share on other sites More sharing options...
Adrian Posted September 17, 2015 Author #6 Share Posted September 17, 2015 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.