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

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 150956

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>