NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Microsoft Virtualization Discussions

Howto delete a snapshot without confirmation?

dietermann
6,260 Views

Hello,

I want to delete many snapshots with the same name on different volumes and filers.

My script works, but I have to Confirm each remove-Nasnapshot.

How can I disable the Confirmation?

The cmdlet i use in the inner loop is

"remove-NaSnapshot $volName $snapName"

Best regards

Matthias Dietermann

1 ACCEPTED SOLUTION

vinith
6,260 Views

Add -confirm:$false to suppress confirmation

PS C:\Windows\system32> Remove-NaSnapshot voltest test1 -Confirm:$false

View solution in original post

2 REPLIES 2

vinith
6,261 Views

Add -confirm:$false to suppress confirmation

PS C:\Windows\system32> Remove-NaSnapshot voltest test1 -Confirm:$false

dietermann
6,259 Views

Hello Vinith,

thanks for your quick response.

This was exactly the parameter I was looking for!

(get-help remove-NaSnapshot was a little short on that parameter.)

My script runs now without interverntion!

Best regards

Matthias

Public