Microsoft Virtualization Discussions
Microsoft Virtualization Discussions
Hi Team,
I need to get a list of snapshots for all volumes on the filer. However, when I execute the following command the out put says "Not Enough Memory". I have extended the memory to 5120 MB, still no luck.
Hi Krishna,
Is there any chance you could post a screenshot of the error or posted the exact wording and eloborate where the error appears... i.e doe it appear withing the PowerShell console?
Kind regards,
Jason
^^
From a pure best practices you shouldn't have to do a select volumename b/c get-nasnapshot will accept from the pipeline the proper vol name
Try this to see if this works just in your powershell console
get-navol | % {
write-host "Volume Name:" $_.name
get-nasnapshot $_.name
}
See if you get output from that
Also - what were your specs again and what toolkit version
Hi Krishna,
I suspect you might be using an older version of the PowerShell Toolkit? Use the following CmdLet to identify which version you have:
PS C:\> Get-NaToolkitVersion
Major Minor Build Revision
----- ----- ----- --------
3 0 0 90
I've come accross this memory error issue before and found that newer versions of the toolkit have a "-Terse" paramater associated with the "Get-NaVol" CmdLet which prevents the CmdLet querying each volume object for all of it's properties (which tends to result in a out-of-memory error on systems with a large number of volumes). See:
PS C:\> Get-help Get-NaVol -full
NAME
Get-NaVol
SYNOPSIS
Get volume status.
SYNTAX
Get-NaVol [[-Name] <String[]>] [-Aggregate <String>] [-Terse] [-Controller <NaController>] [<CommonParameters>]
-Terse
If specified, omit retrieving some volume attributes, including "RaidGroups" in the "Plexes" array, "SnapAutoDelete", and "AutoSize". Use wh
en retrieving a large number of volumes and these attributes are not necessary.
Hope that helps
/matt
Thank You all for your valuable suggestions on this. In my case the issue was with the memory of the server, which was overloaded. I ran the script on a server which has sufficient memory (RAM) and it worked fine.
However, all your suggestions are valuable and have made a note of them to use them when in need. Happy New Year..!!
Best Regards,
Krishna Kishore Govada.