Icacls stands for “Integrity Control Access Control Lists”. It is a command-line tool that enables the users to view, manage, and modify permissions of the file and folder. Moreover, it includes some advanced features including “Inheritance”, “Ownership”, “Backup”, and “Restore”. It is designed to target IT professionals so they can manage permissions for thousands of files and folders.
In this article, the “icacls” cmdlet will be used to manage files and folder permissions.
What is the “Icacls” Cmdlet in PowerShell?
It is stated that the “icacls” is used to manage permissions of the file and folders. Check out the below-given examples for managing the permissions of files and folders.
Example 1: Use the “icacls” Cmdlet to Display the Permissions
Use the “icacls” cmdlet along with the file directory to get the permissions of a stated file:
Example 2: Use the “icacls” Cmdlet to Display the Permissions for a Folder and its Subfolder
Rub the given command to output the permissions of the files/folders in the subdirectory:
Example 3: Use the “icacls” Cmdlet to Add a Permission to a File or Folder
To apply or add the permissions to a file or folder execute the given command:
Example 4: Use the “icacls” Cmdlet to Remove Permissions From a File or Folder
To remove the permissions of a file or folder, use the provided code:
Example 5: Use the “icacls” Cmdlet to Deny Permissions to a File or Folder
In order to deny the permissions of a specific file or folder, execute the given command:
That was all about the “icacls” cmdlet.
Conclusion
The “icacls” cmdlet is used to manage file or folder permissions including removing, adding, denying, or displaying in PowerShell. Moreover, it can manage the permissions of various files and folders at once. This post has elaborated on the “icacls” cmdlet with the assistance of several examples.