Windows

takeown

CautionTake file ownership

takeown /f <path> /r

Takes ownership of inaccessible files (/a gives it to Administrators). Then fix ACLs with icacls.

Examples

  • takeown /f D:\old-user /r /aTake ownership recursively

Syntax

takeown /f <path> [/r] [/a]

Before you run it

Ownership changes are audit-relevant.

Related commands

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store