Steven,
'whatif' showed no issue but when I actually try to delete I am getting this:
VERBOSE: Deleting snapshot exchsnap__ex_08-30-2013_19.05.47__daily from volume exch2_1.
Remove-NaSnapshot : Could not find file 'C:\Users\admin\AppData\Local\Temp\omxngtox.dll'.
At line:1 char:244
+ Get-NaVol | Get-NaSnapshot | where-object {($_.Created -lt (Get-Date).AddDays(-5)) -and ($_.name -notlike "@snapmir@
*") -and ($_.name -notlike "hourly*") -and ($_.name -notlike "nightly*") -and ($_.name -notlike "smvi_*")} | remove-nas
napshot <<<< -confirm:$false -verbose
+ CategoryInfo : InvalidOperation: (10.5.5.5:NaController) [Remove-NaSnapshot], FileNotFoundException
+ FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Snapshot.RemoveNaSnapshot
here is the script:
PS C:\Windows\system32> Get-NaVol | Get-NaSnapshot | where-object {($_.Created -lt (Get-Date).AddDays(-2)) -and ($_.nam
e -notlike "@snapmir@*") -and ($_.name -notlike "hourly*") -and ($_.name -notlike "nightly*") -and ($_.name -notlike "sm
vi_*")} | remove-nasnapshot -confirm:$false -verbose
any ideas?
cheers