how to rename a computer in powershell code example
Example: powershell rename computer
Rename-Computer -NewName "Server044" -DomainCredential Domain01\Admin01 -Restart
Rename-Computer -NewName "Server044" -DomainCredential Domain01\Admin01 -Restart