4

Does anyone know of a Powershell script that will list all shares and their ACL's on a NETAPP vfiler?

3 Answers 3

3

The Data ONTAP PowerShell Toolkit has a Get-NaCifsShareAcl cmdlet that'll do just what you want.

PS C:\> connect-nacontroller dunn

PS C:\> Get-NaCifsShareAcl | select ShareName -ExpandProperty UserAclInfo
ShareName        AccessRights        UnixGroupName       UserName
---------        ------------        -------------       --------
ETC$             Full Control                            BUILTIN\Administrators
C$               Full Control                            BUILTIN\Administrators
test             Full Control                            everyone
test             Full Control                            DUNN\krusty
test2            No Access                               everyone
test2            Full Control                            DUNN\krusty
HOME             Full Control                            everyone
HOME             rw-                                     root
0

I dont believe that this works, unfortunately-- you can show the ACLs of shares seen when connecting straight to the controller, but not of vFiler shares so far as I can tell.

0

Too bad the latest toolkit does not support the retrieval of ACL's.

This error is common and means that this toolkit does not support certain versions of OnTap.

PS C:\Users\m0132130> Get-NaCifsShareAcl | select ShareName -ExpandProperty UserAclInfo
Get-NaCifsShareAcl : Unable to find API: cifs-share-acl-list-iter-start
At line:1 char:19
+ Get-NaCifsShareAcl <<<<  | select ShareName -ExpandProperty UserAclInfo
+ CategoryInfo          : InvalidOperation: (clnt-corp-e0475:NaController)
[Get-NaCifsShareAcl], EAPINOTFOUND
+ FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Cifs.GetNaCifsShareAcl

(Edit: formatting)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .