Renaming AD computer with PS

PS is your friend, this is how you can easily do that:

PS C:\Users\administrator.DOMAIN> Rename-Computer -ComputerName "OldName" -NewName "NewName" -DomainCredential domain\user -force -Restart