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.