Renaming a Computer
Applies To: Windows Server 2008 R2
This topic explains how to use the Active Directory module for Windows PowerShell to rename a computer.
Example 1
The following example demonstrates how to rename the local domain-joined computer on which the command is being executed. This command must be run on the local computer:
ReName-Computer -NCN MyComputer
Example 2
The following example demonstrates how to rename the local domain-joined computer on which this command is being executed. This command must be run on the local computer:
ReName-Computer -ComputerName S1 -NCN MyComputer
Example 3
The following example demonstrates how to rename the local domain-joined computer on which this command is being executed. This command must be run on the local computer:
ReName-Computer S1 -NCN MyComputer
Example 4
The following example demonstrates how to rename a non-domain-joined computer:
Rename-ADObject ‘CN=fabrikamsrv1,OU=ManagedComputers,DC=Fabrikam,DC=com’ –NewName fabrikamsrv3
Additional information
For a full explanation of the parameters that you can pass to ReName-Computer or Rename-ADObject, at the Active Directory module command prompt, type Get-Help ReName-Computer –detailed or Get-Help Rename-ADObject –detailed, and then press ENTER.