Az Module Issues

Product: PowerShell Universal
Version: 4.0.8

I’m not sure if this is an issue that can be remedied PSU side (altho i do have a workaround for now), but certainly many people have had issues with Az modules, assembly conflicts, etc. I’ve seen plenty of issues raised on the MS github pages with similar problems, particularly across varying versions of the Az modules.

The specific issue i’ve seen, seems to be when installing Az modules using the PSU GUI from the PSGallery feed.
Initially it may work, but once I restart my web app, I’ll often see something like this in the logs:
The command Get-Az… was found but could not load file or assembly…

Any components I have that require those functions are broken, no matter what I end up trying to do I cant seem to resolve the issue and usually just delete my web app (including app service plan), delete the Az modules, and rebuild via terraform.

If I manually install the modules (the same version), e.g copy and paste the module folder from my machine into my modules folder on my storage account. Everything works fine, even after a reboot.

For now I’ve decided just to stay away from using the PSU GUI to install any Az modules.
These modules have always been very flakey with their assemblies and I’ve seen similar problems with azure automation accounts too.

Can confirm. Had the very same issues with various Az modules when installing through the admin GUI. Went to manually providing them through the Repository\Modules folder and never looked back.

I actually don’t install any module through the interface anymore because of it…

To be fair, I haven’t really played around much with many PSGallery modules and I’d assumed this was just Az related, but did you see the same issue happen with other non ms modules too?

That’s interesting. We just do a Save-Module (Save-PSResource) to the Repository\Modules folder so I wonder why it would be different installing via the GUI vs saving it manually.

I’ve been asking myself the same thing…
Now even more so.