Microsoft Virtualization Discussions

why does this fail? get-ncsnapshot | Select-Object "xxx-vc1 tier 1_11-29-2020_18.40.00.0426"

moonman2013

Hello,

Using powershell, I know how to copy/paste my snapshots to the clipboard

Get-NcVol dmz_vmware_t1_nfs11_dst | get-ncsnapshot | Select-Object Name | clip

 

Once I find the snapshot I want to delete it using powershell, but it fails

Get-NcVol dmz_vmware_t1_nfs11_dst | get-ncsnapshot | Select-Object "xxx-vc1 tier 1_11-29-2020_18.40.00.0426"| Remove-NcSnapshot

 

What am I doing wrong?

Should I do this instead?

Get-NcVol dmz_vmware_t1_nfs11_dst | get-ncsnapshot | | {$_.name -like "xxx-vc1 tier 1_11-29-2020_18.40.00.0426"} | remove-ncsnapshot -Confirm:$False

 

Thanks in advance

1 ACCEPTED SOLUTION

hmoubara

Hello

 

You should be able to perform the command in deleting the snapshot by running the command as below:

 

>GET-NCVOL <vol name> |get-ncsnapshot | remove-ncsnapshot

 

The command will start asking you about each snapshot available and if you want to deleted or not.

If you already know the snapshot name you would run the below command:

 

>GET-NCVOL <vol name> |get-ncsnapshot | remove-ncsnapshot <volname> <snapshot name>

 

Thanks 

View solution in original post

1 REPLY 1

hmoubara

Hello

 

You should be able to perform the command in deleting the snapshot by running the command as below:

 

>GET-NCVOL <vol name> |get-ncsnapshot | remove-ncsnapshot

 

The command will start asking you about each snapshot available and if you want to deleted or not.

If you already know the snapshot name you would run the below command:

 

>GET-NCVOL <vol name> |get-ncsnapshot | remove-ncsnapshot <volname> <snapshot name>

 

Thanks 

View solution in original post

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public