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 »

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: 20283
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Change the VM name in Powershell

Post by veremin »

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 »

Thanks for the response. It works.
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests