Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to use a calculated property on Get-VM. I want to get the shortened version of the hostcluster property using split, but its not working. Here's an example of what I'm trying to do:

get-VMMserver -computername "VMM1"
get-VM | select computername, @{name="Host"; expression={($_.hostcluster.split("."))[0]}}
share|improve this question
1  
When I look at he properties of a VM object I don't see "hostcluster" as a property. What version of VMM are you using? –  Mike Nov 19 '12 at 12:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.