Microsoft Virtualization Discussions

Ontap commands run from Powershell

HighmarkECB
1,445 Views

Hello all, Need some help.  I want to run the following:

 

volume snapshot show -fields create-time, size, state, is-constituent

Using the Ontap Powershell and redirect it to a local Excel format.  I can get connected to my Clusters using the Connect-NcController, just cannot get the syntax correct for the volume command.

 

Any help would be great. 

1 ACCEPTED SOLUTION

Ontapforrum
1,400 Views

Try to look up in our forum, you might find lots of examples. 

 

This command should return the size, created time but not sure about state, is-constituent.

Get-NcSnapshot 

 

Check this thread:
https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Powershell-command-to-list-snapshot-details-for-particular-volumes/m-p/108689

 

Following command will give more output, check it out yourself.

Get-NcSnapshot | ?{ $_.Created}
Get-NcSnapshot | ?{ $_.Created} | Export-Csv snapshot.csv
Note: File will get saved in your c:/drive.

View solution in original post

1 REPLY 1

Ontapforrum
1,401 Views

Try to look up in our forum, you might find lots of examples. 

 

This command should return the size, created time but not sure about state, is-constituent.

Get-NcSnapshot 

 

Check this thread:
https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Powershell-command-to-list-snapshot-details-for-particular-volumes/m-p/108689

 

Following command will give more output, check it out yourself.

Get-NcSnapshot | ?{ $_.Created}
Get-NcSnapshot | ?{ $_.Created} | Export-Csv snapshot.csv
Note: File will get saved in your c:/drive.

Public