Set permission to a folder: Authenticated users but in different language

Tsvetkov, Martin 22 Reputation points
2021-11-22T15:12:27.707+00:00

Hello there I want to set permission to a folder

Start-Process -FilePath "icacls" -ArgumentList ""$env:SystemDrive\KaercherDiag" /q /c /t /q /grant "Authenticated users":(OI)(CI)F" -WindowStyle 'Hidden'

The problem is that I don't know the system locale language and respectively Authenticated users can be different for any language. Is there a way to find how is written and take it as variable.

Thank you in advance

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 60,161 Reputation points
    2021-11-22T16:03:21.17+00:00

    You don't need the locale, Authenticated Users is a standard group in Windows. Use *S-1-5-11 for the user name. This is the SID of the Authenticated users group defined for all versions of Windows.

    0 comments No comments

  2. Limitless Technology 39,921 Reputation points
    2021-11-23T20:50:00.993+00:00

    Hello @Tsvetkov, Martin

    You can use either SID or the SDDL

    https://learn.microsoft.com/en-us/windows/win32/secauthz/sid-strings

    For example /grant *WD instead of /grant *S-1-1-0 and /grant *BU instead of /grant S-1-5-32-545
    (
    is required before)

    Hope this helps with your query,

    -------
    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.