Microsoft Virtualization Discussions

Re: Data ONTAP PowerShell Toolkit 3.2

Possible bug with command: Add-NcFileDirectorySecurityPolicyTask

I am trying to automate adding CIFS SACLs (for auditing).


The command:

PS C:\Powershell> Add-NcFileDirectorySecurityPolicyTask -Name SecPolicyTask_ResetEveryoneFullControl -VserverContext <some Vserver> -Path "<some path>" -SecurityType "ntfs" -NtfsMode "propagate" -NtfsSecurityDescriptor ntfssd


Always throws up this error:
Add-NcFileDirectorySecurityPolicyTask : Invalid value specified for "ntfs-sd" element within "file-directory-security-policy-task-add": " ".
At line:1 char:38
+ Add-NcFileDirectorySecurityPolicyTask <<<< -Name SecPolicyTask_ResetEveryoneFullControl -VserverContext <some Vserver> -Path "<some path>" -SecurityType "ntfs" -NtfsMode "propaga
te" -NtfsSecurityDescriptor ntfssd
+ CategoryInfo : InvalidOperation: ( [Add-NcFileDirectorySecurityPolicyTask], EINVALIDINPUTERROR
+ FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.FileDirectorySecurity.AddNcFileDirectorySecurityPolicyTask

The equivalent ssh command runs without error:


vserver security file-directory policy task add -vserver <some Vserver> -policy-name SecPolicyTask_ResetEveryoneFullControl -path "<some path>" -security-type ntfs -ntfs-mode propagate -ntfs-sd ntfssd -index-num 1


Also, is there a way to get the PowerShell equivalent of:

"set -privilege advanced"
"vserver security file-directory policy apply"





Re: Data ONTAP PowerShell Toolkit 3.2

This is indeed a bug in 3.2 ... Please upgrade to the latest (3.2.1) version from; the issue has been fixed. Regarding accessing priviledged commands, there is no equivalent of "set -privilege advanced". Some advanced commands are available as cmdlets - they require no special permissions/setting for execution. For those which do not have equivalent cmdlets, check out the Invoke-NcSsh command. That might serve as a viable workaround. Hope this helps, Aparajita

Re: Data ONTAP PowerShell Toolkit 3.2

Thanks, Aparajita. Really appreciate your looking into this issue. 



Re: Data ONTAP PowerShell Toolkit 3.2

Get-NaShelf does not seem return AT-FCX shelves.


Can anyone else confirm? Is this a bug?


I am using version 3.2.1