Active DirectoryMicrosoft TechnologiesWindows Server

The DS Commands – DSMOVE

In today post lets look in to another DS command which we can use to administer active directory. Today command is "DSMOVE". This is very similar to the object move from right clicking and selecting "Move" option in AD users and computers snap-in. It allows to move object from one container to another.

The common syntax will be like

dsmove objectDN -newparent targetOUDN

In here objectDN refers to the DN of the object which will need to move. targetOUDN refers to the DN of the new parent OU it will need to move in to.

The help file will be able to open using dsmove /? and these commands need to be run using administrator privilege in DC server.

dsmove1

the command i will use to demonstrate this will be dsmove "CN=John Smith,OU=Sales Department,DC=contoso,DC=com" -newparent "OU=HR Department,DC=contoso,DC=com" , it will move the user John Smith from Sales Department OU to HR Department OU. Lets check the object before move.

dsmove2

Lets run the command and see.

dsmove3

dsmove4

So according to it were able to successfully move the object from one OU to another.

This is the end of this post and lets look in to another DS command in next post.

Related posts
Cyber SecurityMicrosoft Entra IDMicrosoft Technologies

Microsoft Entra lifecycle workflows Part 02 - How to synchronize value for employeeHireDate attribute from on-premises Active Directory ?

In my previous blog post, I explained how we can automate JML (Joiners/Movers/Leavers) process by…
Read more
Azure servicesMicrosoft Entra IDMicrosoft Technologies

Step-by-Step Guide : Automate JML(Joiners/Movers/Leavers) process with Microsoft Entra lifecycle workflows

JML (Joiners/Movers/Leavers) process of an organization has a major impact on its security and…
Read more
Cyber SecurityMicrosoft DefenderMicrosoft Technologies

Microsoft Defender for Identity Part 02 – Create Directory Service Account

In Part 01 of Microsoft Defender for Identity blog series, I have explained about Microsoft Defender…
Read more
Newsletter
Become a Trendsetter

Sign up and get the best of RebelAdmin, tailored for you.

Leave a Reply

Your email address will not be published. Required fields are marked *