Udostępnij za pośrednictwem


Netdom remove

 

Applies To: Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows 8

Removes a workstation or server from the domain.

Netdom is a command-line tool that is built into Windows Server 2008 and Windows Server 2008 R2. It is available if you have the Active Directory Domain Services (AD DS) server role installed. It is also available if you install the Active Directory Domain Services Tools that are part of the Remote Server Administration Tools (RSAT). For more information, see How to Administer Microsoft Windows Client and Server Computers Locally and Remotely (https://go.microsoft.com/fwlink/?LinkID=177813). To use netdom, you must run the netdom command from an elevated command prompt. To open an elevated command prompt, click Start, right-click Command Prompt, and then click Run as administrator.

To use netdom, you must run the netdom command from an elevated command prompt. To open an elevated command prompt, click Start, right-click Command Prompt, and then click Run as administrator.

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

Syntax

netdom remove <Computer> {/d: | /domain:}<Domain> [{/ud: | /userd:}[<Domain>\]<User> [{/pd: | /passwordd}{<Password>|*}]] [{/uo: | /usero}<User> [{/po: |/passwordo}{<Password>|*}]] [/reboot[:<Delay>]] [{/help | /?}]

Parameters

Parameter

Description

<Computer>

Specifies the name of the computer that you want to remove.

{/d: | /domain:}<Domain>

Specifies the domain from which you want to remove the computer. If you do not specify this parameter, then netdom remove uses the domain that the current computer belongs to.

{/ud: | /userd:}[ <Domain>\]<User>

Specifies the user account that makes the connection with the domain that you specify in the /d or /domain parameter. If you do not specify this parameter, then netdom remove uses the current user account.

{/pd: | /passwordd}{<Password>|*}

Specifies the password of the user account that you specify in the /ud or /userd parameter. If you specify the value of this parameter as a wildcard character (*), this parameter prompts you for the password.

{/uo: | /usero}<User>

Specifies the user account to make the connection with the computer that you want to remove. If you do not specify this parameter, then netdom remove uses the current user account.

{/po: |/passwordo}{<Password>|*}

Specifies the password of the user account that you specify in the /uo or /usero parameter. If you specify the value of this parameter as a wildcard character (*), this parameter prompts you for the password.

/reboot[:<Delay>]

Specifies to shut down and automatically restart the computer after the remove operation completes. The Delay value is the number of seconds before automatic shutdown occurs. The default Delay value is 20 seconds.

{/help | /?}

Displays help at the command prompt.

Examples

To remove mywksta from the mydomain domain and make the workstation a part of a workgroup, type the following command at the command prompt:

netdom remove /d:mydomain mywksta /ud:mydomain\admin /pd:password

Additional references

Command-Line Syntax Key

Netdom

Netdom add

Netdom computername

Netdom join

Netdom move

Netdom query

Netdom movent4bdc

Netdom renamecomputer

Netdom reset

Netdom resetpwd

Netdom trust

Netdom verify