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 need to find the space used by only a select group of volumes.
PS C:\WINDOWS\system32> Get-NcVol | Where-Object { $_.State -eq 'offline'} | ( ????)
What command can I use to get the total space used by only the offine volumes?
Thanks
Solved! See The Solution
1 ACCEPTED SOLUTION
Terrydari123 has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You got it about 95% of the way there. I would do:
Get-NcVol | Where-Object {$_.State -eq "offline"} | select Name, @{l = "TotalSizeGB"; e = {$([Math]::Round($_.TotalSize / 1GB, 2))}}
It'll return something like this:
Name TotalSizeGB ---- ----------- testvol 250
The TotalSize is reported in bytes, so I'm just using a calculated property to convert it back to GB for readability's sake.
1 REPLY 1
Terrydari123 has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You got it about 95% of the way there. I would do:
Get-NcVol | Where-Object {$_.State -eq "offline"} | select Name, @{l = "TotalSizeGB"; e = {$([Math]::Round($_.TotalSize / 1GB, 2))}}
It'll return something like this:
Name TotalSizeGB ---- ----------- testvol 250
The TotalSize is reported in bytes, so I'm just using a calculated property to convert it back to GB for readability's sake.
