Im looking for some help on a batch file for managing NTFS permissions through a batch file.
I have created a folder containing several subfolders. The main folder is shared through NET SHARE command and is working. Now I need to set NTFS permission through command-line commands in batch file.
I need to remove access for any users except admin and a specific user.
i can add the specific user through ICACLS C:\bruger2\jesper /grant:r jesper:f
but the remove part wont work
ICACLS c:\bruger2\jesper /remove Users
Nvm guys, I found the answer.
I needed to include /inheritance:r to remove inherited NTFS permissions