Problem with Powershell

This is the script:

$a=get-date
foreach ($name in $dir)
{
$user = Get-QADUser -SamAccountName $name.name
if (!$user) {
write-Host $name.name
$path = “x:\”+$name.name
$path2 = “x:\_old homedirs\”+$name.name
move-item $path $path2
rename-item -Newname ($name.name+” Archived at “+$a)
}
}


The move works fine, but the rename gives me an error.
I’ve also tried this:

rename-item -path (“x:\_old homedirs\”+$name.name) -Newname ($name.name+” Archived at “+$a)

But I get the same error. The error is:

Rename-Item : Cannot rename because the target specified represents a path or device name.