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
Ok, i'm suffering from a brainfreeze today.....
Im looking to find active snapshot used space on volumes and i'm having an absolute brainfreeze.... Will someone kick start my brain for me...
I tried get-nahelp *snapshot* but nothing there
7 REPLIES 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you can get the total snap usage from:
( get-naefficiency vol0).SnapUsage
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Perfect.. With all the powershell I do, I never used that cmdlet.. Cool, I will use it.. thanks...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This did the trick..
"{0:N0}" -f( (((get-naefficiency vol1).snapusage).used ) / 1gb)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Peter,
Im not following you on this? The above code works without issue.. Can you paste what you put and output.. (Take out any company specifics)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
JGPShntap -
My bad - I re-ran the script - this time copy&paste - I got the correct answer - I think my brackets were not spaced correctly
::
"{0:N0}" -f( (((get-naefficiency vol0).snapusage).used ) / 1gb)
7
(get-naefficiency vol0).SnapUsage | ft -AutoSize
Count Reserve Used Overflow
----- ------- ---- --------
10 32212254720 7813873664 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Peter
There is many ways to skin a cat here.. I did it that way b/c I was using it in an excel spreadsheet.
But if you just want to see output, you can send it to convertto-formattednumber
PS C:\powershell> ((get-naefficiency vol0).snapusage).used | convertto-formattednumber
55G
Or i wrote a function that i load as a module
Function Convert-togb()
{
Param (
[Parameter(Position=0,Mandatory=$True,ValueFromPipeline=$True)]
#[int]$data
$data
)
Process {
[math]::truncate($data/1gb)
}
}
and I just send it to that
PS C:\powershell> ((get-naefficiency vol0).snapusage).used | convert-togb
51
