PowerShell script exchange
Post Reply
chris.arceneaux
VeeaMVP
Posts: 668
Liked: 359 times
Joined: Jun 24, 2019 1:39 pm
Full Name: Chris Arceneaux
Location: Georgia, USA
Contact:

Automated Upgrade from 9.5u4b to v10

Post by chris.arceneaux » 4 people like this post

I recently released a script on VeeamHub that automates the Veeam environment upgrade from 9.5 Update 4b to v10. It can be used to upgrade both Veeam Backup Enterprise Manager and Veeam Backup & Replication Server.

If you're a VCSP, the script can also be used for Cloud Connect environment upgrades.

https://github.com/VeeamHub/powershell/ ... UpgradeV10

Enjoy!
wishr
Veteran
Posts: 3077
Liked: 453 times
Joined: Aug 07, 2018 3:11 pm
Full Name: Fedor Maslov
Contact:

Re: Automated Upgrade from 9.5u4b to v10

Post by wishr » 1 person likes this post

Great stuff, Chris! Thanks for sharing!
Leo0601
Enthusiast
Posts: 41
Liked: 2 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

Re: Automated Upgrade from 9.5u4b to v10

Post by Leo0601 »

Hi Chris,
First I wanna thank you for this awesome stuff. We are doing automation through powershell. Right now I am upgrading Veeam 9.5 U4 to Veeam 10 through powershell. But I am getting some error. I contacted veeam support. They ask me to contact you via forum veeam. I need your help now. I am getting below error during the execution. Below the error log. Can you kindly help me to fix this issue

Code: Select all

=== Verbose logging started: 10/13/2020  11:20:18  Build type: SHIP UNICODE 5.00.9600.00  Calling process: C:\Windows\system32\msiexec.exe ===
MSI (c) (1C:88) [11:20:18:339]: Resetting cached policy values
MSI (c) (1C:88) [11:20:18:339]: Machine policy value 'Debug' is 0
MSI (c) (1C:88) [11:20:18:339]: ******* RunEngine:
           ******* Product: :\Catalog\VeeamBackupCatalog64.msi
           ******* Action: 
           ******* CommandLine: **********
MSI (c) (1C:88) [11:20:18:339]: Client-side and UI is none or basic: Running entire install on the server.
MSI (c) (1C:88) [11:20:18:339]: Grabbed execution mutex.
MSI (c) (1C:88) [11:20:18:386]: Cloaking enabled.
MSI (c) (1C:88) [11:20:18:386]: Attempting to enable all disabled privileges before calling Install on Server
MSI (c) (1C:88) [11:20:18:386]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (84:68) [11:20:18:402]: Running installation inside multi-package transaction C:\Temp\:\Catalog\VeeamBackupCatalog64.msi
MSI (s) (84:68) [11:20:18:402]: Grabbed execution mutex.
MSI (s) (84:08) [11:20:18:417]: Resetting cached policy values
MSI (s) (84:08) [11:20:18:417]: Machine policy value 'Debug' is 0
MSI (s) (84:08) [11:20:18:417]: ******* RunEngine:
           ******* Product: C:\Temp\:\Catalog\VeeamBackupCatalog64.msi
           ******* Action: 
           ******* CommandLine: **********
MSI (s) (84:08) [11:20:18:417]: Note: 1: 2203 2: C:\Temp\:\Catalog\VeeamBackupCatalog64.msi 3: -2147286788 
MSI (s) (84:08) [11:20:18:417]: MainEngineThread is returning 123
MSI (s) (84:68) [11:20:18:449]: User policy value 'DisableRollback' is 0
MSI (s) (84:68) [11:20:18:449]: Machine policy value 'DisableRollback' is 0
MSI (s) (84:68) [11:20:18:449]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (84:68) [11:20:18:449]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s) (84:68) [11:20:18:449]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s) (84:68) [11:20:18:449]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
MSI (c) (1C:88) [11:20:18:449]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
MSI (c) (1C:88) [11:20:18:449]: MainEngineThread is returning 123
=== Verbose logging stopped: 10/13/2020  11:20:18 ===
Thanks in advance
Leo
jhoughes
Veeam Vanguard
Posts: 279
Liked: 112 times
Joined: Apr 20, 2017 4:19 pm
Full Name: Joe Houghes
Location: Castle Rock, CO
Contact:

Re: Automated Upgrade from 9.5u4b to v10

Post by jhoughes »

There appears to be an issue with the path as you have it formatted.

The installer is trying to run from 'C:\Temp\:\Catalog\VeeamBackupCatalog64.msi', which would not work.
Husband, Father, Solutions Architect, Geek Extraordinaire | @DenverVMUG, @AustinVMUG & @ATXPowerShell leader | VMware vExpert | Cisco Champion
chris.arceneaux
VeeaMVP
Posts: 668
Liked: 359 times
Joined: Jun 24, 2019 1:39 pm
Full Name: Chris Arceneaux
Location: Georgia, USA
Contact:

Re: Automated Upgrade from 9.5u4b to v10

Post by chris.arceneaux »

Hi Leo,

Ditto to what @jhoughes mentioned. To make sure you're entering the correct parameters, you can use the code below to find examples:

Code: Select all

Get-Help .\Update-Veeam.ps1 -Full
Other than that, I'm not sure about the error you're facing as I'm not seeing an error in the log you provided.

From a troubleshooting perspective, the script is pretty straight forward and is verbose with built-in logging. As such, you need to to take a top-down approach line by line until you reach the line of code that fails. When you find the code in question, you can troubleshoot further. For example, if the error occurs while installing VeeamBackupCatalog64.msi, you can attempt to install this file manually to see if you encounter an error.

If you are not able to perform this troubleshooting, I recommend you do not use the script and proceed with Veeam's provided installation wizard.

Please note the script was tested using Windows Server 2019. I've received confirmation that Windows Server 2016 will work but has an issue when unmounting the ISO at the end of the upgrade. For older OS versions, this script will not work.
jhoughes
Veeam Vanguard
Posts: 279
Liked: 112 times
Joined: Apr 20, 2017 4:19 pm
Full Name: Joe Houghes
Location: Castle Rock, CO
Contact:

Re: Automated Upgrade from 9.5u4b to v10

Post by jhoughes »

Yep, looking at Chris' code, you appear to be feeding a folder path of 'C:\Temp', rather than a valid path to an ISO file.

If you don't have the ISO downloaded, you need to run the script with the download option as below:

Code: Select all

Update-Veeam.ps1 -ISO "download"
You'll still need to use the 'License' parameter as appropriate.
Husband, Father, Solutions Architect, Geek Extraordinaire | @DenverVMUG, @AustinVMUG & @ATXPowerShell leader | VMware vExpert | Cisco Champion
Leo0601
Enthusiast
Posts: 41
Liked: 2 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

Re: Automated Upgrade from 9.5u4b to v10

Post by Leo0601 »

Hi Chris and jhoughes,

Thanks for your reply and your script is working but I have got stuck on one more issue. If you could help me it would be really great.

OS : Windows 2019
Veeam Version : Veeam Backup & Replication 9.5 Update 4b
Build No : 9.5.4.2615

We have upgraded our Veeam Backup and replication server running on Windows 2012 to Windows 2019. Post upgrade we are able to access Veeam backup and replication server and all services are up. We are planning to upgrade Veeam to version 10. and we are facing issue while we connect the Veeam server through Powershell.

VeeamPSSnapin looks to be missing and we are not getting it under "Get-PSSnapin -Registered" list. How to install the missing powershell module in this case. can you please help on this ?

Thanks in advance
Leo
Leo0601
Enthusiast
Posts: 41
Liked: 2 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

Re: Automated Upgrade from 9.5u4b to v10

Post by Leo0601 »

Hi Chris and jhoughes,

Thanks for your reply and your script is working but I have got stuck on one more issue. If you could help me it would be really great.

OS : Windows 2019
Veeam Version : Veeam Backup & Replication 9.5 Update 4b
Build No : 9.5.4.2615

We have upgraded our Veeam Backup and replication server running on Windows 2012 to Windows 2019. Post upgrade we are able to access Veeam backup and replication server and all services are up. We are planning to upgrade Veeam to version 10. and we are facing issue while we connect the Veeam server through Powershell.

VeeamPSSnapin looks to be missing and we are not getting it under "Get-PSSnapin -Registered" list. How to install the missing powershell module in this case. can you please help on this ?

Thanks in advance
Leo
chris.arceneaux
VeeaMVP
Posts: 668
Liked: 359 times
Joined: Jun 24, 2019 1:39 pm
Full Name: Chris Arceneaux
Location: Georgia, USA
Contact:

Re: Automated Upgrade from 9.5u4b to v10

Post by chris.arceneaux »

Hi Leo,

I'd open a support case with Veeam as it seems something was lost during the OS upgrade. This is also a good idea because if PS cmdlets aren't showing, there might other unseen issues. Please upload your logs so Veeam support can review them.

To answer your question on how to install Veeam PS cmdlets:

Per Veeam docs: The Veeam PowerShell component is installed by default as a part of the Veeam Backup & Replication or the Veeam Backup & Replication Console.
JeremiahDDS
Service Provider
Posts: 31
Liked: 7 times
Joined: Mar 28, 2019 12:52 am
Full Name: Jeremiah Glover
Contact:

Re: Automated Upgrade from 9.5u4b to v10

Post by JeremiahDDS »

Has someone updated this for v11?
chris.arceneaux
VeeaMVP
Posts: 668
Liked: 359 times
Joined: Jun 24, 2019 1:39 pm
Full Name: Chris Arceneaux
Location: Georgia, USA
Contact:

Re: Automated Upgrade from 9.5u4b to v10

Post by chris.arceneaux » 1 person likes this post

Not yet. I'll be working on this though. Only differences in the upgrade process are:
  • PowerShell snapin vs module
  • An additional package to install for Veeam Agent for MacOS Redistributable
JeremiahDDS
Service Provider
Posts: 31
Liked: 7 times
Joined: Mar 28, 2019 12:52 am
Full Name: Jeremiah Glover
Contact:

Re: Automated Upgrade from 9.5u4b to v10

Post by JeremiahDDS »

Thanks
chris.arceneaux
VeeaMVP
Posts: 668
Liked: 359 times
Joined: Jun 24, 2019 1:39 pm
Full Name: Chris Arceneaux
Location: Georgia, USA
Contact:

Re: Automated Upgrade from 9.5u4b to v10

Post by chris.arceneaux » 1 person likes this post

The upgrade script for v11 is now complete!

It can be accessed at the link below:

https://github.com/VeeamHub/powershell/ ... UpgradeV11

FYI @JeremiahDDS
JeremiahDDS
Service Provider
Posts: 31
Liked: 7 times
Joined: Mar 28, 2019 12:52 am
Full Name: Jeremiah Glover
Contact:

Re: Automated Upgrade from 9.5u4b to v10

Post by JeremiahDDS »

How about v12?
chris.arceneaux
VeeaMVP
Posts: 668
Liked: 359 times
Joined: Jun 24, 2019 1:39 pm
Full Name: Chris Arceneaux
Location: Georgia, USA
Contact:

Re: Automated Upgrade from 9.5u4b to v10

Post by chris.arceneaux » 2 people like this post

Patience :mrgreen: Currently working on it…

I’ll update this thread once available.
JeremiahDDS
Service Provider
Posts: 31
Liked: 7 times
Joined: Mar 28, 2019 12:52 am
Full Name: Jeremiah Glover
Contact:

Re: Automated Upgrade from 9.5u4b to v10

Post by JeremiahDDS »

Thanks, looking forward to it.
Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests