Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

3 Answers

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
share|improve this answer
add comment

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.

share|improve this answer
add comment

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)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.