Where is Rename-Computer?
In PowerShell V2, we added a bunch of computer management cmdlets:
PS >Get-Command -Noun Computer | Format-Table -Auto
CommandType Name Definition
-———- —- ———-
Cmdlet Add-Computer Add-Computer [-DomainName] [-Credent
Cmdlet Checkpoint-Computer Checkpoint-Computer [-Description] [
Cmdlet Remove-Computer Remove-Computer [[-Credential]
Cmdlet Restart-Computer Restart-Computer [[-ComputerName] <String[]>]
Cmdlet Restore-Computer Restore-Computer [-RestorePoint] [-Ve
Cmdlet Stop-Computer Stop-Computer [[-ComputerName] <String[]>] [[
Astute followers of our CTP process might notice a missing entry in this list when compared to earlier builds: the Rename-Computer cmdlet.
During testing and additional validation, we realized two things:
- The API used to rename computers is fairly “forgiving”
If you specify an invalid computer name, the API often doesn’t reject it – but instead transforms it. For example, supplying a computer name that is too long will simply truncate the computer name and complete the operation. There’s nothing like losing a computer in your domain! Similarly, the API supports full Unicode input, while many applications break if the computer name is not the same as its NetBIOS name (which does not support full Unicode.)
- The API used to rename computers is fairly “forgiving”
- Our implementation failed to detect some higher-level scenarios that the existing NetDom.exe command detects
NetDom.exe is a tool that already lets you rename computers, and users might expect some degree of compatibility with the safety it ensures. For example: in the machine a CA server? In the middle of a DC promo? In the middle of a role change?
- Our implementation failed to detect some higher-level scenarios that the existing NetDom.exe command detects
Since both netdom.exe and WMI (http://msdn.microsoft.com/en-us/library/aa393056(VS.85).aspx) are easily accessible alternatives, we decided to remove the cmdlet rather than ship something that didn’t meet expectations.