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.
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:
-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
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
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..!!