Set-AzureService does not change service name! It only changes deployment name and description. These properties are just kind of Meta-Data associated with the hosted service deployment. You cannot change cloud service name (**cloudservice**.cloudapp.net
) by any means! You can only create or delete cloud service.
And, not you can't change VM's name via Azure PowerShell cmdlets
, but most probably you can do this by remote power shell to the targeted VM. Please note that renaming a Windows machine always requires restart!
For information on how to use Remote Power Shell
on Azure VM, please check out this article.
UPDATE
I think what you need is the UpdateRole action on the management API. It has parameter RoleName
which is desribed as:
RoleName
Required. Specifies the name for the virtual machine. The name must be unique within Windows Azure.
And the powershell cmdlet to use is: Update-AzureVM