title: How to grant full permission for authenticated users for a folder with powershell
body: <p>I want to grant to the builtin authenticated user group access to my folder. After running my script i can see that the authenticated users has been added as a new entry in the security tab of the folder, but full controll has not been set.</p>
  
  <p><a href="https://i.stack.imgur.com/yaf27.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yaf27.png" alt="enter image description here"></a></p>
  
  <p>Here is my script</p>
  
  <pre><code>$local=Get-WinSystemLocale
  
  $acl = get-acl C:\ProgramData\foo\bar
  if ($local.Name.StartsWith("de")){
      Write-Host "deutsches System"
      $ace = new-object system.security.AccessControl.FileSystemAccessRule('authentifizierte Benutzer','FullControl','Allow')
  }
  elseif ($local.Name.StartsWith("en")){
      Write-Host "englisches System"
      $ace = new-object system.security.AccessControl.FileSystemAccessRule('Authenticated Users','FullControl','Allow')
  }
  elseif ($local.Name.StartsWith("fr")){
      Write-Host "französisches System"
      $ace = new-object system.security.AccessControl.FileSystemAccessRule('Authenticated Users','FullControl','Allow')
  }
  
  $acl.AddAccessRule($ace)
  $acl | Set-Acl
  </code></pre>
  
  <p>By the way is there a better way to distinguish between the names for the authenticated users group? I solved it with examine the name of the system locale and then i can decide how the group is named. Currently I do not know the french translation.</p>