Microsoft Virtualization Discussions

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

AndreKov
1,207 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