1

Requirement: In our organisation, several employees have frequent transfers to different zones, which are different domains within a single forest. Need to transfer users from one domain to another domain using some free of cost solution.

My Understanding:

I know that there are several tools available in the market like Quest, etc. which is dedicated for this. Then, we have Microsoft's free ADMT for this as well. I am looking to automate the process in our case using C#, or else, using powershell script (I'm not very much comfortable).

Challenges:

I have searched on the web to invoke something using C#, but, the result was almost in vain. Then I switched to powershell variant, where I found some posts like this on GitHubGist, but, the requirements and the warnings mentioned there makes me feel uncomfortable.

Moreover, since we are having an Exchange setup, so the requirement is to migrate all the attributes set in the user account in the source-domain. So, scripts like the ones mentioned above clearly say that they have left some of the additional settings.

What I want is to automate our flow of user-migration, but using our own script/code which we will thoroughly test and deploy.

WHAT I TRIED:

I tried using Move-ADObject in my UAT setup, where there is no firewall challenge or limitation, but, still it gives an error stating "A referral was returned from the server". I used all kinds of permission, but, the error still remains the same.

I used below cmdlet what is stated in the Microsoft's TechNet article:

Moves an object with DistinguishedName 'CN=Peter Bankov,OU=Accounting,DC=Fabrikam,DC=com' to a different domain.

// Moves an object with 
// DistinguishedName 'CN=Peter Bankov,OU=Accounting,DC=Fabrikam,DC=com' 
// to a different domain.

Move-ADObject -Identity "CN=Peter Bankov,OU=Accounting,DC=Fabrikam,DC=com" 
-TargetPath "OU=Accounting,DC=Europe,DC=Fabrikam,DC=com" 
-TargetServer "server01.europe.fabrikam.com"

UAT architecture is having the forest domain with several child servers which are having transitive trusts. Trust of all child servers is with the root server.

LOOKING FOR AN EFFICIENT SOLUTION:

I'm looking for an effective solution which helps to migrate user account with same set of attributes set in the previous-domain. Thanks for your time.


NOTE: Please bear with me; this may look like a programming question, but, is more inclined to knowing the process of how and which options to explore. I have recently begun working on Active Directory Services.

  • You might wanna check this out: social.technet.microsoft.com/wiki/contents/articles/… – Makorus Apr 10 '18 at 8:27
  • 1
    @Makorus - Thanks, but, I've already checked these links. I wanted to do the same using some sort of script. Right now we're using the GUI of ADMT to migrate users on a case to case basis. I'll write the answer for this question, if I find the solution using codes/scripts. Thanks again for your time. – Am_I_Helpful Apr 10 '18 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.