Add Users group in the local computer to Shared Permission

Boopathi Subramaniam 3,241 Reputation points
2023-05-07T15:11:46.1933333+00:00

Hello, Users group is missing Shared Permission for a folder in multiple Windows 2019 Servers. How can I add Builtin USERS group as READ access for multiple servers from remote using a batch file. What is the command to be used? Please let me know.

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,454 questions
{count} votes

Accepted answer
  1. Konstantinos Passadis 17,376 Reputation points MVP
    2023-05-07T16:09:52.0866667+00:00

    Hello @Boopathi Subramaniam !

    You can use the icacls command to add permissions to the Builtin USERS group for a folder. Here's an example batch file you can use:

    @echo off

    set /p folderpath=Enter the path of the folder to modify permissions for:

    icacls "%folderpath%" /grant "BUILTIN\Users:(R)"

    Save this code in a batch file with a .bat extension, and run it on each server where you want to modify the permissions. When you run the batch file, it will prompt you to enter the path of the folder you want to modify permissions for. Once you enter the path, it will use the icacls command to grant READ access to the BUILTIN\Users group for the specified folder.

    Kindly mark the answer as Accepted and Upvote in case it helped or post your feedback to help !

    Regards

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful