Product: PowerShell Universal Version: 4.4.0
Hello,
I’m sure this has been partially answered somewhere on the forum, but I’m trying to consolidate all the information in one place.
In my production environment, I’m still running version 4.4.0. I’ve been holding off on upgrading, waiting for version 5 to include the improvements I need and to become relatively stable and bug-free.
I’ve now installed all the v5 versions in my development environment, up to the latest 5.6.1. I’ve re-coded all my apps to take advantage of the new features in 5.6.1 and added a lot of new functionality.
So, it’s finally time to upgrade production.
I understand that for such a major upgrade, the old version must be uninstalled before installing the new one. I have a few questions regarding this process:
In short: how can I prepare the upgrade so that it goes as smoothly as a regular minor update?
Anyone ??
Nobody has done it before or there is nothing to worry about ?
I’m not sure how it handles the database between major versions (if you’re using sqllite) I’ll let someone else answer that
But certainly for your repo and all the files contained within, and even your appsettings.json, they should remain untouched by any uninstall/install process. Obviously, it should still go without saying, any changes in your production environment like this, still make sure you have backed things up and have a rollback plan. Snapshot your VM, or as a minimum copy your database and repo files to an alternative location, it’s always worth doing anyway just in case even if you don’t expect impact.
Hi,
maybe my input is usefull.
When we updated from major version 4 to major version 5 (5.5.1 to be exactly) I did the following stuff before execute the msi file:
and it went pretty smooth.
No apps (dashboards), variables, scripts or endpoints got lost in the process, also the appsettings.json wasn’t touched
Edit:
Have a look at this:
docs.powershelluniversal.com
yep i also think that all of the settings, apps, schedules and endpoints will remain untouched (since its all stored in powershell scripts anyway and they should be not deleted)
im little worry about secrets variables. i can backup them and restore after but it will be nice if it will be not affected as well.
ofcourse vm snapshot is mandatory (even with minor updates)
We just did 4.5.x to 5.5.x. The big thing was moving from queues to computer groups and making sure that all schedules were set with the computer group instead. We have one entry point into our prod cluster (only one server can be modified with git pushing to the others). I shut them all down, made changes to the schedules, computer groups, etc, and restarted just the one. Once that was up I would upgrade each additional node.
The biggest headache was git.. because of the upgrade I had to manually copy the repository to every other node so the .git folder would be 100% in sync.
i dont have cluster. only one prod server and one dev. and they are not synced (although i have git set on both but in different projects
I just did the update from 4.4.1 to 5.6.1, the environment PSU runs on is:
Windows Server 2022 MS SQL Server 2019 WS-Fed authentication (Configured in AppSettings.json) Git Sync
I haven’t run into any issues you wanted specifically answered, but I did have the following issues:
But as to your point the apps/dashboards work fine, nothing seems to have been lost, and the few issues I have above is mostly due to it being a system with a history of helper scripts and other quirks from not having had the features when I developed it
On the last one - that’s expected going from v4 to v5, you’ll need to change your appsettings.json to use either Permissive or Integrated SecurityModel, or re-work how you use the PSU cmdlets since strict mode works a little different and it’s more secure, the gRPC errors are a bit misleading, but its likley to do with that.
I had the same issues, initially I switched to integrated, but I’m now looking into Strict instead for better security as my instance will be used by a few different people/teams.
See: Module | PowerShell Universal
Yep, that was actually why I didn’t upgrade past 4.x back then, and I didn’t have the time to address it then, but in hindsight I guess it was a bit silly since at the end of the day, not running 5.x because you have to “lower security” is kind of the equivalent of not upgrading to Windows 7 because Windows XP doesn’t have UAC Slider
But figured it was at least a good opportunity to answer OP’s question so he knew what to expect
Wait, we are not that old… right? @AnonymousUser
Of course not, I was just reading off Wikipedia
(Or I guess watching a TikTok about it )