I've not done this so this may be off base, but doesn't the group and the user have to be an object? Maybe this will work?

 Code:
$WS = GetObject("LDAP://CN=UPM_Test,OU=Login Script,OU=!Development,DC=MyDomain,DC=SubDomain,DC=SubDomain2,DC=TopLevel")
$User =Getobject(TranslateName(3,"",3,@domain+"\"+$User,1)[0])
$WS.add ($User.ADsPath)
@ERROR + @SERROR + @CRLF
$WS.Setinfo
@ERROR + @SERROR 


I don't know what Translatename returns, so its possible you will need something like $User=getobject("LDAP://" + TranslateName... )