Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Trying to use PS Toolkit to create FPolicy on several svms across multiple clusters.
Stuck on new-NcFpolicyPolicy -Name ransomwarePolicy -Event cifsEvent, nfsV3Event, nfsV4Event -EngineName native -VserverContext svm_1
new-NcFpolicyPolicy : [400]: Failed to create policy "ransomwarePolicy". Reason: scope is a required field.
At line:1 char:1
+ new-NcFpolicyPolicy -Name ransomwarePolicy -Event cifsEvent, nfsV3Eve ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [New-NcFpolicyPolicy], Exception
+ FullyQualifiedErrorId : 400,DataONTAP.C.PowerShell.SDK.Cmdlets.Fpolicy.NewNcFpolicyPolicy
I can use the new-NC-FpolicyScope to create a scope, but it fails as the noted 'ransomwarePolicy' has not been created yet.
Does anyone know what the -scope parameter is used for? Cannot find any examples and it's not shown in the help for the command. Powershell says it's not a required parameter.
Using 9.14.1 PS Toolkit
Powershell 7.4.1.0
connecting to a cluster running 9.10.1p10
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In Rest call scope is the required property
Scope of the policy. Can be limited to exports, volumes, shares or file extensions.
To use scope please create New-Object DataONTAP.C.Types.Fpolicy.Scope
Sample:
$Scope= New-Object DataONTAP.C.Types.Fpolicy.Scope
$Scope.ExcludeExportPolicies = "export"
New-NcFpolicyPolicy -Name $Name -Event $EventName -EngineName native -NonMandatory -VserverContext $fpolicyVserver -Scope $Scope
Please find the description of scope:
scope | {
|
