Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2025 04:58 AM
Hi @V V Satyanaray1
If your service account has all the necessary access to modify the user OU in AD, then you can run the below custom powershell cmdlet on yiur mid server.
# Replace with the user's distinguished name (DN)
$userDN = "CN=JohnDoe,OU=OldOU,DC=example,DC=com"
# Replace with the target OU where the user should be moved
$targetOU = "OU=NewOU,DC=example,DC=com"
# Move the user to the new OU
Move-ADObject -Identity $userDN -TargetPath $targetOU
# (Optional) Verify the move by getting the user's new OU
Get-ADUser -Identity $userDN | Select-Object DistinguishedName, Name, ObjectClass
Regards,
Siva