Need some help with move-adobject


i trying run:

get-adcomputer testpc | move-adobject -targetpath (get-adorganizationalunit -filter "name -eq '_test'")

i trying move hostname testpc ou _test. have both, getting error:

move-adobject : cannot convert 'system.object[]' type 'system.string'

i trying move user:

get-aduser testuser | move-adobject -targetpath "cn=ie,ou=firefox,ou=chrome,dc=ad,dc=mlp,dc=com"

but getting following error:

move-adobject : object cannot added because parent not on list of possible superiors

thanks help

hi,

i have tested command below , move computer target path successfully.

 get-adcomputer w122 | move-adobject -targetpath 'ou=forcomputerou,dc=uu,dc=com'

for more information, refer article below.

the easy way use powershell move computer accounts

https://blogs.technet.microsoft.com/heyscriptingguy/2012/03/01/the-easy-way-to-use-powershell-to-move-computer-accounts/

best regards,

jay


please remember mark replies answers if , un-mark them if provide no help. if have feedback technet subscriber support, contact tnmff@microsoft.com.



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Motherboard replacement

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state

Remote Desktop App - Error 0x207 or 0x607