none
Cannot move AD computers from one OU to another RRS feed

  • Question

  • Hi All

    I have a problem that is driving me buggy.  I am basically trying to use Powershell to move a computer from the default Comptuers container in Active Directory to a different container

    After importing the ActiveDirectory module into the PowerShell console I use the command

    Get-ADComputer BADSANTA | Move-ADObject -TargetPath 'OU=ElfComputers,OU=NorthPole,DC=XMas,DC=Local'

    However, I keep getting:
    Move-ADObject : The operation could not be performed because the object's parent is either uninstantiated or deleted

    Wednesday, December 9, 2015 8:18 PM

Answers

  • GRRR

    I guess I should have used  BADMIKE in my example

    Using the Get-ADOrganizationalUnit, like ya suggested sort of forced me to really catch it

    SHeesh, it's been a long day.

    Using my examples... The OU structure I typed out for the post was correct
    However, I kept typing my OU more like   OU=ElfComputers,DC=Xmas,DC=Local
    Missing that whole 'OU=NorthPole'

    Thanks

    • Marked as answer by Mike here Wednesday, December 9, 2015 9:20 PM
    Wednesday, December 9, 2015 9:19 PM

All replies

  • Get-AdOrganizarionalUnit 'OU=ElfComputers,OU=NorthPole,DC=XMas,DC=Local'

    What happens?


    \_(ツ)_/

    Wednesday, December 9, 2015 8:24 PM
  • Hi,

    And what happen if you try the Move-ADobject with the computer Distinguished Name ?

    Move-ADObject "CN=BADSANTA,DC=YourDormain,DC=local" -TargetPath "OU=ElfComputers,OU=NorthPole,DC=XMas,DC=local"

    Wednesday, December 9, 2015 8:24 PM
  • GRRR

    I guess I should have used  BADMIKE in my example

    Using the Get-ADOrganizationalUnit, like ya suggested sort of forced me to really catch it

    SHeesh, it's been a long day.

    Using my examples... The OU structure I typed out for the post was correct
    However, I kept typing my OU more like   OU=ElfComputers,DC=Xmas,DC=Local
    Missing that whole 'OU=NorthPole'

    Thanks

    • Marked as answer by Mike here Wednesday, December 9, 2015 9:20 PM
    Wednesday, December 9, 2015 9:19 PM
  • Was getting the same exact error when using that command
    Wednesday, December 9, 2015 9:19 PM