snippetbashTip
takeown — Take ownership of a file or directory. More information: <https://learn.microsoft.com/windows-server
Viewed 0 times
directorycommandtakeclifileownershipmoretakeown
windows
Problem
How to use the
takeown command: Take ownership of a file or directory. More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/takeown>.Solution
takeown — Take ownership of a file or directory. More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/takeown>.Take ownership of the specified file:
takeown /f {{path\to\file}}Take ownership of the specified directory:
takeown /d {{path\to\directory}}Take ownership of the specified directory and all subdirectories:
takeown /r /d {{path\to\directory}}Change ownership to the Administrator group instead of the current user:
takeown /a /f {{path\to\file}}Code Snippets
Take ownership of the specified file
takeown /f {{path\to\file}}Take ownership of the specified directory
takeown /d {{path\to\directory}}Take ownership of the specified directory and all subdirectories
takeown /r /d {{path\to\directory}}Change ownership to the Administrator group instead of the current user
takeown /a /f {{path\to\file}}Context
tldr-pages: windows/takeown
Revisions (0)
No revisions yet.