This tutorial is written to help administrator to write script to grant folder NTFS permission.
Script 1:
Grant NTFS “Modify” access with Inheritance Enabled
ICACLS | ICACLS “<FOLDER_PATH>” /inheritance:e /grant “<WINDOWS_ACCOUNT>:(CI)(OI)M” |
CALCS | CACLS “<FOLDER_PATH>” /T /E /G “<WINDOWS_ACCOUNT>“:C |
Express Excel Script
- Copy the content of below table and paste to Excel at Cell A1
- Set Tools with ICACLS or CACLS
- Set Folder Path and Windows Account
- Add additional data and copy Express Excel Script
Tools (ICACLS/CACLS)
|
Folder Path
|
Windows Account
|
Express Excel Script
|
ICACLS | D:\Share\Share1 | Domain1\User1 | =IF(A2=”ICACLS”,”ICACLS “”” & B2 &””” /inheritance:e /grant “”” & C2 & “:(CI)(OI)M”””,IF(A2=”CACLS”,”CACLS “”” & B2 & “”” /T /E /G “”” &C2 &”””:C”,”#Unsupported Tools”)) |
[ddownload id=”898″] YLNotes__ExpressExcelScript_Icacls_Calcs ([ddownload_count id=”898″])