PowerShell script exchange
Post Reply
esir
Novice
Posts: 8
Liked: never
Joined: Mar 29, 2019 2:52 pm
Full Name: Esir Kings
Contact:

Change the VM name in Powershell

Post by esir » Apr 18, 2019 9:02 am

I am trying to restore a backup from Veeam to Azure. I can be able to do this from the Veeam Backup and Replication application. I have to however change the name of a VM machine to less than 15 characters for it to work. I want to achieve the same using Powershell. The following command returns the restore point I need but I now need to change its VM name

Code: Select all

$restore_point = Get-VBRRestorePoint | Select -Last 1
returns a VM with a name greater than 15 letters as required by Azure. Is there a way to set

Code: Select all

$restore_point.VmName
to something new less than 15 characters??

veremin
Product Manager
Posts: 16666
Liked: 1390 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Change the VM name in Powershell

Post by veremin » Apr 18, 2019 11:03 am

To restore VM to Azure and set a new name to it you need to use Start-VBRVMRestoreToAzure cmdlet along with its -VMName parameter. Thanks!

esir
Novice
Posts: 8
Liked: never
Joined: Mar 29, 2019 2:52 pm
Full Name: Esir Kings
Contact:

Re: Change the VM name in Powershell

Post by esir » Apr 18, 2019 11:48 am

Thanks for the response. It works.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 3 guests