Take Ownership With The Command Prompt / PowerShell

Walter Isaacson
Walter Isaacson Last Updated: May 19, 2022

Software: Windows 7, 8 & 10 | Last modified on 2018-06-18

Avoid using this process on system directories & files as it might cause security risks.

A guide to using the takeown & icacls commands for taking ownership and resetting permissions of directories and files with the Command Prompt or PowerShell.

Take ownership of a file or folder

  1. Open the Command Prompt (Admin) or PowerShell (Admin).
  2. The following commands are available for changing permissions:

    • takeown /F directory\* /R /A
      icacls directory\*.* /T /grant administrators:F

      takeown /F C:\Users\Test\* /R /A
      icacls C:\Users\Test\*.* /T /grant administrators:F

      Replace directory with the path of the directory or files you wish to take ownership of.
      Replace administrators with the group of users you wish to assign to the directory or file.

      The wildcards (*) at the end of the path means that all files within the defined directory will also have their permission changed.

Reset ownership & permissions

  1. Open the Command Prompt (Admin) or PowerShell (Admin).
  2. The following command is available for resetting permissions:

    • CD driveLetter:\ icacls * /T /Q /C /RESET
      Example: CD D:\ icacls * /T /Q /C /RESET
      Replace driveLetter with the assigned letter of the disk drive.

Walter Isaacson
Written by

Walter Isaacson

Walter Isaacson, a professor of history at Tulane, has been CEO of the Aspen Institute, chair of CNN, and editor of Time. He is the author of 'Leonardo da Vinci; The Innovators; Steve Jobs; Einstein: His Life and Universe; Benjamin Franklin: An American Life; and Kissinger: A Biography, and the coauthor of The Wise Men: Six Friends and the World They Made. Visit him at Isaacson.Tulane.edu and on Twitter at @WalterIsaacson

0 ratings

Related articles