<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Setting NTFS ACL permission via the ONTAP PowerShell module in ONTAP Discussions</title>
    <link>https://community.netapp.com/t5/ONTAP-Discussions/Setting-NTFS-ACL-permission-via-the-ONTAP-PowerShell-module/m-p/143415#M31827</link>
    <description>&lt;P&gt;Thanks Gidi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am checking out that forum post...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are the requirments for using Set-Acl? It requires credentails so does it need access to the mgmt, or svm? Sorry, I am not a NetApp guy.. just attempting to automate shares being created.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mike&lt;/P&gt;</description>
    <pubDate>Tue, 09 Oct 2018 14:43:44 GMT</pubDate>
    <dc:creator>PwrShll</dc:creator>
    <dc:date>2018-10-09T14:43:44Z</dc:date>
    <item>
      <title>Setting NTFS ACL permission via the ONTAP PowerShell module</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Setting-NTFS-ACL-permission-via-the-ONTAP-PowerShell-module/m-p/142815#M31703</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="add-nccifsshare.png" style="width: 805px;"&gt;&lt;img src="https://community.netapp.com/t5/image/serverpage/image-id/8471i903653E0B9DE5AFF/image-size/large?v=v2&amp;amp;px=999" role="button" title="add-nccifsshare.png" alt="add-nccifsshare.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I can also see the permission I applied via the GUI in Windows&amp;nbsp;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?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Get-ncfiledirectory.png" style="width: 845px;"&gt;&lt;img src="https://community.netapp.com/t5/image/serverpage/image-id/8472i7CF4DE5231154E0A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Get-ncfiledirectory.png" alt="Get-ncfiledirectory.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 13:18:05 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Setting-NTFS-ACL-permission-via-the-ONTAP-PowerShell-module/m-p/142815#M31703</guid>
      <dc:creator>PwrShll</dc:creator>
      <dc:date>2025-06-04T13:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: Setting NTFS ACL permission via the ONTAP PowerShell module</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Setting-NTFS-ACL-permission-via-the-ONTAP-PowerShell-module/m-p/142842#M31707</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the ontap PS module way:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.craig-tolley.co.uk/2016/02/09/assigning-permissions-to-a-volume-through-the-netapp-powershell-toolkit/" target="_blank"&gt;http://www.craig-tolley.co.uk/2016/02/09/assigning-permissions-to-a-volume-through-the-netapp-powershell-toolkit/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;however i think that set-acl is the&amp;nbsp;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&amp;nbsp;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&amp;nbsp;default access list, apply NTFS ACL and then only changes the share access list as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;use with:&lt;/P&gt;
&lt;PRE&gt;Set-MyPermission -MyPath "\\filer\share\" -MyCred (get-credential)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Function Set-MyPermission
{
    [CmdletBinding()]
    param($MyPath,$MyCred)
    $MyPSSession = New-PSSession -Credential $MyCred 
    Invoke-Command -Session $MyPSSession -ArgumentList $MyPath -ScriptBlock `
    {
        param([string]$MyPath)
        try
        {
            $MyObjacl =  Get-ACL $MyPath
        }
        Catch
        {
            Write-Error -Category InvalidData -message  "Could not get current Folder ACL"
            return
        }
	try
	{
	    $MyAclRule = New-Object System.Security.AccessControl.FileSystemAccessRule(("RW_Group"),"Modify","ContainerInherit, ObjectInherit", "Allow", "Allow") 
	    $MyObjacl.AddAccessRule($MyAclRule)
	    #add more lines as above here
        }
        catch
        {
            Write-Error -Category InvalidData -message  "Failed to use one or more of the groups to create the ACE"
            return
        }
        try
        {
            Set-Acl $MyPath $MyObjacl
        }
        Catch
        {
            Write-Error -Category InvalidData -message "Failed apply the ACE on the folder"
            $MyObjacl
            return
        }
    }
    Remove-PSSession $MyPSSession
}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Gidi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2018 00:22:25 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Setting-NTFS-ACL-permission-via-the-ONTAP-PowerShell-module/m-p/142842#M31707</guid>
      <dc:creator>GidonMarcus</dc:creator>
      <dc:date>2018-09-21T00:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: Setting NTFS ACL permission via the ONTAP PowerShell module</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Setting-NTFS-ACL-permission-via-the-ONTAP-PowerShell-module/m-p/143415#M31827</link>
      <description>&lt;P&gt;Thanks Gidi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am checking out that forum post...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are the requirments for using Set-Acl? It requires credentails so does it need access to the mgmt, or svm? Sorry, I am not a NetApp guy.. just attempting to automate shares being created.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 14:43:44 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Setting-NTFS-ACL-permission-via-the-ONTAP-PowerShell-module/m-p/143415#M31827</guid>
      <dc:creator>PwrShll</dc:creator>
      <dc:date>2018-10-09T14:43:44Z</dc:date>
    </item>
  </channel>
</rss>

