Processes in Microsoft 365 for setting up Office apps, redeeming product keys, and activating licenses.
Unfortunately, I cannot provide you with the final solution.
But you may want to try the -file parameter of powershell.exe. It partially works for us. This means that the script is executed correctly, but Intune always shows a wrong installation status in the first moment. So we have not yet solved this case conclusively either.
powershell -executionpolicy bypass -file ".\install.ps1" -i -name "myApp" -variant "2022"