powershell rename computer

C++
Rename-Computer -NewName "Server044" -DomainCredential Domain01\Admin01 -Restart
Source

Also in C++: