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

Error when creating Snapshot poliy - New-NcSnapshotPolicy : Svm parameter neither specified nor set

AndreKov
1,702 Views

Hello,

 

I want to create snapshot policies through a script. This works on physical filers but for some reason the same code does not work on our virtual netapp ONTAP filers.

 

I get the following error code when executing : New-NcSnapshotPolicy -Name $policyName -Schedule $scheduleName -Count $retentionCount -SnapmirrorLabel $snapshotmirrorlabel -Comment $comment -Enabled $true

 

Error:

New-NcSnapshotPolicy : Svm parameter neither specified nor set
At \\nur0fs02\data\IT\Scripts\Netapp-Snapshot-Script.ps1:117 char:1
+ New-NcSnapshotPolicy -Name $policyName -Schedule $scheduleName -Count ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-NcSnapshotPolicy], ArgumentException
+ FullyQualifiedErrorId : Svm is empty,DataONTAP.C.PowerShell.SDK.Cmdlets.Snapshot.NewNcSnapshotPolicy

 

 

 

Not sure if this is a bug on the virtual ONTAP ?  I always connect to the cluster and not to an SVM. The Snapshot Policy I want to create should have a cluster scope.

 

Thank you

0 REPLIES 0
Public