Hi Team,
I am looking for a script via which I can list snapshots on all volumes in a cluster/vserver.
I am new to scripting, hence looking for your guidance and support.
Kindly help and let me know if this can be done.
Using ONTAP PowerShell Module, simplest one:PS C:\> Get-NcSnapshot | Export-Csv "C:\temp\$($filer).snapshots.csv"
Selected fields:PS C:\> Get-NcSnapshot | Select Name,Volume,Vserver | Export-Csv "C:\temp\$($filer).snapshots.csv"
Just look up in the netapp forum, there are many examples (for automation) not just limited to PS. One such basic PS thread example is this:https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Script-to-list-snapshot-copies-of-all-volumes/td-p/24484
Related:
https://www.netapp.com/pdf.html?item=/media/16861-tr-4475pdf.pdfhttps://community.netapp.com/t5/Microsoft-Virtualization-Discussions/NetApp-PowerShell-Toolkit-9-11-1-2208-released/m-p/437915
I believe this is just to list the snapshots under the cluster.
However, I would need to understand this from very beginning.
For example: Logging into the cluster via providing the IP address and having the script authenticated.
Then logging into the cluster and listing the snapshots.
Therefore, I had provided the links. Please see TR-4475, it covers everything from beginning, concept to installation steps.