You can use the Split method for that.
Something like this
$shortName = $vmhost.Name.Split('.')[0]
What that does is to split the hostname at all locations where there is a dot.
The result is returned as an array of strings, and we want the first string