VMware

John Tuffin's Blog

John Tuffin's Personal Log about E-Learning Course Development

Previous Next
3

This bit of code takes the output from Get-Datastore and converts it from megabytes to Gigabytes. It also labels the columms as FreespaceGB and CapacityGB. This is from the forums as well.

<code>Get-Datastore | ft name,@{ Label = "FreespaceGB"; Expression = { $_.FreeSpaceMB * 1MB / 1GB } }, @{ Label = "CapacityGB"; Expression = { $_.CapacityMB * 1MB / 1GB } } </code>



Apr 10, 2008 8:27 AM jfierberg

This does not work. The ft returns the following error: out-lineoutput : Object of type "Microsoft.PowerShell.Commands.Internal.Format.
FormatStartData" is not legal or not in the correct sequence. This is likely ca
used by a user-specified "format-table" command which is conflicting with the d
efault formatting.

Apr 14, 2008 8:59 AM cpqarray VMware in response to: jfierberg

I just ran the command again and it worked. Want me to send you a script and see if you get the same error?

Jun 25, 2009 10:12 AM JimmyDean in response to: cpqarray

Below is what i get taking your above code pasting it in a text file saving it .ps1 Then trying to run it.

out-lineoutput : Object of type "Microsoft.PowerShell.Commands.Internal.FormatStartData" is not legal or not in the correct sequence. This is likely caused by a user-specified "format-table" command which is conflicting with the default formatting.

Click to view cpqarray's profile Member since: Nov 24, 2005

John Tuffin's Personal Log about E-Learning Course Development

View cpqarray's profile

Communities