Hi there
This might be a PS issue more than a NetApp issue, yet I will give it a try here 🙂
I'm trying to do a list of snapshots on volumes that are older than a specific date...
I connect OK to the cluster, and I can go a get-ncvol with no issues.. but when I try to add pipes to it, so to get the snapshots, it complains...
so this works OK:
$volumes = get-ncvol
But this fails:
$snapshots = get-ncvol | get-ncsnapshot
And this also fails:
$oldsnapshots = get-ncvol | get-ncsnapshot | where-object {$_.created -lt "$maxsnapshotdesiredage"}
Finding old snapshots...
get-ncsnapshot : Volume parameter neither specified nor set
At C:\Users\blah\Documents\list.ps1:15 char:17
+ $oldsnapshots | get-ncsnapshot | where-object {$_.created -lt "$maxsn ...
+ ~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-NcSnapshot], ArgumentException
+ FullyQualifiedErrorId : Volume is empty,DataONTAP.C.PowerShell.SDK.Cmdlets.Snapshot.GetNcSnapshot
So it looks like when ever I use a |Pipe| it complains...
PS C:\Users\blah\Documents> $PSVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
5 1 14409 1029
This has been working from this Windows hosts before... so my guess it that it is some Powershell thing that has changed as it has most likely been upgraded since I last used it....
Any help is welcome...