I entered your PowerShell locally on my computer this way
$newOU = [adsi]"LDAP://$TargetOU"
$comp= ([adsisearcher]"samaccountname=$($ServerName)$").FindOne()
$comp.GetDirectoryEntry().MoveTo($newOU)
And that seems to work for me. The main thing I did have to change was adding in parentheses after FindOne and GetDirectoryEntry and I had to change $test to $comp. Is it possible that your PowerShell has the same issues?
Thanks,
Rich