(0) exportieren Drucken
Alle erweitern
Arp
At
Cd
Cls
Cmd
Del
Dir
Fc
For
Ftp
If
Ldp
Lpq
Lpr
Md
Mmc
Msg
Nlb
Rcp
Rd
Reg
Rem
Ren
Rsh
Rsm
Rss
Sc
Set
Sfc
Ver
Vol
Erweitern Minimieren
2 von 2 fanden dies hilfreich - Dieses Thema bewerten.

Takeown

Letzte Aktualisierung: April 2007

Betrifft: Windows 7, Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2, Windows Server 2008, Windows Server 2008 R2, Windows Vista

Enables an administrator to recover access to a file that previously was denied, by making the administrator the owner of the file.

For examples of how to use this command, see Examples.

Syntax

takeown [/s <Computer> [/u [<Domain>\]<User name> [/p [<Password>]]]] /f <File name> [/a] [/r [/d {Y|N}]]

Parameters

 

Parameter Description

/s <Computer>

Specifies the name or IP address of a remote computer (do not use backslashes). The default value is the local computer. This parameter applies to all of the files and folders specified in the command.

/u [<Domain>\]<User name>

Runs the script with the permissions of the specified user account. The default value is system permissions.

/p [<Password>]

Specifies the password of the user account that is specified in the /u parameter.

/f <File name>

Specifies the file name or directory name pattern. You can use the wildcard character * when specifying the pattern. You can also use the syntax ShareName\FileName.

/a

Gives ownership to the Administrators group instead of the current user.

/r

Performs a recursive operation on all files in the specified directory and subdirectories.

/d {Y | N}

Suppresses the confirmation prompt that is displayed when the current user does not have the "List Folder" permission on a specified directory, and instead uses the specified default value. Valid values for the /d option are as follows:

  • Y: Take ownership of the directory.

  • N: Skip the directory.

Note that you must use this option in conjunction with the /r option.

/?

Displays help at the command prompt.

Remarks

  • This command is typically used in batch files.

  • If the /a parameter is not specified, file ownership is given to the user who is currently logged on to the computer.

  • You cannot use wildcard characters (? and *) with the takeown command.

  • After deleting the lock with takeown, you might have to use Windows Explorer or the cacls command to give yourself full permissions to the files and directories before you can delete them. For more information about cacls, see "Additional references" at the end of this topic.

Examples

To take ownership of a file named Lostfile, type:

takeown /f lostfile

Additional references

Fanden Sie dies hilfreich?
(1500 verbleibende Zeichen)
Vielen Dank für Ihr Feedback.

Community-Beiträge

HINZUFÜGEN
Microsoft führt eine Onlineumfrage durch, um Ihre Meinung zur MSDN-Website zu erfahren. Wenn Sie sich zur Teilnahme entscheiden, wird Ihnen die Onlineumfrage angezeigt, sobald Sie die MSDN-Website verlassen.

Möchten Sie an der Umfrage teilnehmen?
Anzeigen:
© 2014 Microsoft. Alle Rechte vorbehalten.