So technically you should be able to do it using the /url command but I've not personally done it that way. I've always found it easier to just setup my new server and then do a "install deployment agent" from the new server. The new server would then update the URLs used by the endpoint and re-associate itself with the new server. Another trick is to create a deployment group in the old server and update the failover servers to be that of the new server. As you move machines into this group they will start popping into the new server.
Also make sure you export your latest assigned configs from the old server and import them into the new server so you don't wind up with "orphaned" configs on the endpoint. You have to export the configs as MSIs from the packages tab of the AMC and then import them into the new server.