Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to store a output result in a variable
for example
I use the command
PS C:\Users\Administrator> $vol0size = Get-NcVol vol0 | Format-Table {$_.TotalSize/1GB}
PS C:\Users\Administrator> Write $vol0size
$_.TotalSize/1GB
----------------
86.81876373291015625
I want to store the result (86.81876373291015625) in variable (for examble $vol0size)
but it always store all the result not only 86.81876373291015625
How to make the result just only 86.81876373291015625 ?
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @AllenChang
You should be able to add -HideTableHeaders into the command.
Per example:
$vol0size = Get-NcVol vol0 | Format-Table {$_.TotalSize/1GB} -HideTableHeaders
Thanks
