How can I apply NTFS permissions using the ONTAP PowerShell module? I can't use Set-Acl because I can't pass credentials to it for automation.
When provisioning CIFS shares using the Add-NcCifsShare command, I can see ACL is included... usually the Everyone group since it's a new share. See below.
I can also see the permission I applied via the GUI in Windows show up using Get-NcFileDirectorySecurity and looking at the Acls property. What ONTAP command can I use to apply a AD group and say Read/Execute/List, and another AD group to Modify?
however i think that set-acl is the easier way i'm adding below a function i'm using in my provision script that elevate the permission with Invoke-Command. also - as you start with everyone/full control you acutely only need permission on the share to change the ACL with whatever user you running with (if' it's authenticating). so you can create the share with the default access list, apply NTFS ACL and then only changes the share access list as well.