Managing NTFS file permissions
NTFS file permissions are one of the cornerstones of Windows security. By managing the file permissions, we can decide who has access to which files or directories, and what kind of access they have: read, write, change permissions, and so on.
In this recipe we will cover basic management of file permissions using PowerShell.
Getting ready
All of the steps in this recipe are being performed on a single domain joined server acting as a file server. In this recipe we will be performing four tasks:
Editing the permissions on an Excel spreadsheet
Cloning permissions for a new folder
Taking ownership and reassigning permissions
Enabling inheritance
Note
These steps can be performed locally on the server, remotely using a PSSession, or remotely using file shares.
How to do it...
The tasks we are going to perform are as follows.
Editing the permissions on an Excel spreadsheet
The sales team has an Excel spreadsheet, M:\Sales\Goals.xls
, on our file server that uses NTFS permissions...