Does anyone know of a Powershell script that will list all shares and their ACL's on a NETAPP vfiler?
Asked
Active
Viewed 9,240 times
3 Answers
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

Eric Nicholson
- 259
- 2
- 7
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.

user141365
- 101
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)

Hauke Laging
- 5,285
- 2
- 24
- 40

Joe Bruns
- 11
- 3