Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 183620

Re: Removing character strings within a hashtable

$
0
0

You can create the table in the right format with just the name of the hosts if you modify the second line of your script into:

 

Select @{N="Name";E={$_.Name.Split('.')[0]}},

 

If you want to modify the $hostinfo variable then you can use:

 

$NewHostinfo = $hostinfo | Select-Object -Property @{N="Name";E={$_.Name.Split('.')[0]}},UsedMemoryGB,TotalMemoryGB,FreeMemoryPct


Viewing all articles
Browse latest Browse all 183620

Trending Articles