I have an Azure function app that runs some Powershell and as part of it I am importing a custom Powershell module I wrote. I had tested it and it worked, but when I went to test it again it no longer imports the module correctly, it instead gives the following error and I cannot determine why. Because the Powershell on the Azure function is Powershell Core 7.2 and my module requires Windows Powershell 5.1 (its accessing funtions from the AzureAD Powershell module to update a users password and assign a license to that user) I am calling the Import-Module with the -UseWindowsPowershell parameter to enable compatibility.
I've tried several solutions but none of them seem to address the problem, so any help would be greatly appreciated.
ERROR: Failed to generate proxies for remote module 'AzureCon'. The -OutputModule parameter does not resolve to a path, and a user module path cannot be found for the provided name.