I found a strange behaviour when listing snapshots with Get-NcSnapshot. Can anyone spot my mistake?
Basically, I try to build a script that modifies snapmirror-labels on all Snapshots containing a certain text string in their name.
This was the script I tried: Get-NcSnapshot -SnapName *sometext* -Volume * | Set-NcSnapshot -SnapmirrorLabel yearly
Since this did not work, I tried it manually:
So I connect to the cluster and an SVM with:
Connect-NcController -Name testcluster -Vserver int-nv001-nfs1
Then I run:
Get-NcSnapshot -Volume *
This only returns Snapshots from the Vserver root Volume
If I run:
Get-NcSnapshot -Volume nfs*
It returns only Snapshots from a Volume called nfs_vdi001_data1 (although there are other Volumes called "nfs_vdi001_data2" and "nfs_vmware001_data1" etc. in the same Vserver)
If I run:
Get-NcSnapshot -Volume nfs_vmware* or Get-NcSnapshot -Volume nfs_vmware001_data*
It returns only Snapshots from Volume nfs_vmware001_data1 (although there are other Volumes called "nfs_vmware001_data2", "nfs_vmware001_data3" etc.in the same Vserver)
If I run:
Get-NcSnapshot -Volume nfs_vmware001_data2
It returns only Snapshots from Volume nfs_vmware001_data2 (as expected)
Target Cluster is ONTAP 9.11.1P4