Move-ADObject - input object cannot be found to any parameters for the command - error

后端 未结 2 1871
再見小時候
再見小時候 2021-01-28 21:07

Not exactly sure why I am getting this error - input object cannot be bound to any parameters for the command either because the commmand does not take pipeline input an

2条回答
  •  Happy的楠姐
    2021-01-28 21:53

    You are both piping in the output of Get-ADComputer and also defining the -Identity property which are conflicting. Chose one way or the other.

    Get-ADComputer $comp | Move-ADObject -Targetpath "ou=Database, dc=com,dc=company,dc=net"
    

    or

    $ADComputer = Get-ADComputer $comp
    Move-ADObject -Identity $ADComputer -Targetpath "ou=Database, dc=com,dc=company,dc=net"
    

提交回复
热议问题