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


These steps can be performed locally on the server, remotely using a PSSession, ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.