NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Microsoft Virtualization Discussions

Get-NaCifsShareAcl doesnt'show all users

FRANCESCOG70
2,764 Views

Hi all,

I'm trying to get all the allowed users that acces a CIFS share, I know they're about one hundred, but if I issue the cmdlet in the subject I can see only a few of them. I alredy tried to pipe it into Format-List or Format-Custom, with no luck. It shows only the first four or five users.

Any suggestion or help?

Thank you

Francesco

1 REPLY 1

cknight
2,764 Views

Hi, Francesco.  I'm not sure I understand your question, but I'll try.  Get-NaCifsShareAcl returns objects of type CifsShareAclInfo, which contains an array property UserAclInfo:

PS C:\> Get-NaCifsShareAcl | gm

   TypeName: NetApp.Ontapi.Filer.Cifs733.CifsShareAclInfo

Name        MemberType Definition

----        ---------- ----------

Equals      Method     bool Equals(System.Object obj)

GetHashCode Method     int GetHashCode()

GetType     Method     type GetType()

ToString    Method     string ToString()

Validate    Method     System.Void Validate()

ShareName   Property   System.String ShareName {get;set;}

UserAclInfo Property   NetApp.Ontapi.Filer.Cifs733.AccessRightsInfo[] UserAclInfo {get;set;}

You just have to look in the UserAclInfo array:

PS C:\> (Get-NaCifsShareAcl test).UserAclInfo

AccessRights  UnixGroupName  UserName

------------  -------------  --------

Full Control                 everyone

Full Control                 DUNN\krusty

Public