I want to change the size an Azure VM with powershell. The reason is: I use machine for development. I need A2 size for 4 hours a day. The owner of the VM asked to switch the size of the machine to A0 when I do not develop. I have access to the Azure subscription with my MS Live account. Now I change the size manually through Azure Portal. I want to automate this task with PowerShell. The script should set the size to A2, wait for 4 hours and set it back to A0. I just want to doubleclick the script before starting my development and just forget about the question.
I have the following understanding of the general procedure:
- Run Import-AzurePublishSettings
- Run Select-AzureSubscription
- Get VM object with Get-AzureVM
- Run Set-AzureVMSize
- Update-AzureVM
I can not get publish profile, because I do not own the machine. Is there a way to authenticate with MS Live account?