Sorry, I miss-understood. I thought all of your xen systems were at one location.

 Code:
$Y = "And this is how you access environment variables: %USERNAME%..."
So,
 Code:
$computerprt = "%XDClientName%"