Rename-Computer -NewName "NewName"

-restart at the end if you want it to restart