takeown


takeown new in WS2003

Lets an administrator take ownership of a file.

Syntax

 takeown [/s   Computer   [/u [   Domain   \   User   [/p [   Password   ]]]] /f   FileName   [/a] [/r]    [/d {Y  N}] 

Options

/s Computer

Name or IP address of a remote computer (if omitted, defaults to local computer)

/u [Domain\User[ /p [Password]]]

Credentials for running the command (if omitted, defaults to currently logged-on user)

/f FileName

A file or directory name pattern (wildcard character * and ShareName\FileName format are supported)

/a

Assigns ownership to Administrators group instead of current user

/r

Recursive operation on all files in the specified directory and subdirectories

/d {Y N}

Default prompt to use when current user doesn't have permission to view folders in a directory ( Y takes ownership and N suppresses confirmation prompt)

Examples

Take ownership of the folder C:\docs and the files within it on the remote computer with IP address 172.16.11.230:

  takeown /s 172.16.11.230 /f C:\docs /r /d N  SUCCESS: The file (or folder): "\172.16.11.230\C$\docs" now owned by user    "MTIT\Administrator".     SUCCESS: The file (or folder): "\172.16.11.230\C$\docs\resume.txt" now owned by user   "MTIT\Administrator". 

See Also

cacls , Permissions



Windows Server 2003 in a Nutshell
Windows Server 2003 in a Nutshell
ISBN: 0596004044
EAN: 2147483647
Year: 2003
Pages: 415
Authors: Mitch Tulloch

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net