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, ...

Get Windows Server 2012 Automation with PowerShell Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.