I have created a powershell script that imports a module. In order to import classes, I need to use the "using module" command as per microsoft documentation. My powershell script (ps1) works fine locally with the command but when I import it into an Azure runbook, I get the error "Could not find the module" or error "The given assembly name or codebase was invalid. (0x80131047)" on the using statement.
Set Up
I have created my own runtime environment (currently under preview in Azure) using powershell 7.2. In the runtime, I have successfully imported my modules.
In my PS1 script, I run the command "get-module -ListAvailable" and I can see that my modules are imported successfully. If I do "import-module", it works. But "using module" will not.
Problem
I have created a powershell script that imports a module. In order to import classes, I need to use the "using module" command as per microsoft documentation. My powershell script (ps1) works fine locally with the command but when I import it into an Azure runbook, I get the error "Could not find the module" or error "The given assembly name or codebase was invalid. (0x80131047)" on the using statement.
Set Up
I have created my own runtime environment (currently under preview in Azure) using powershell 7.2. In the runtime, I have successfully imported my modules. In my PS1 script, I run the command "get-module -ListAvailable" and I can see that my modules are imported successfully. If I do "import-module", it works. But "using module" will not.