It would be worth having a look at the logs - maybe it’s a permissions issue.
N.B. When you post code to this forum, if you (on a new line) press Ctrl+e (or click on the </> button on the toolbar) it will insert a preformatted code block, insert your code between the 3 escape characters (replacing ‘type or paste code here’)
This will give us a clearer idea of what your code actually looks like
It looks like the log is not created and the issue is UEM related. When I run Invoke-AppDeployToolkit.exe from the cache folder ( %programdata%\AirWatchMDM\AppDeploymentCache) it give me a 60008 error code. When I copy all the files to a different location (IE Desktop) it starts normally.
I just wrapped the package to .intunewin and deployed it with Intune. It works as how it should be with the following install command: .\ServiceUI_x64.exe -Process:explorer.exe Invoke-AppDeployToolkit.exe
Please run the .ps1 file via PowerShell from this location, not the exe, as this will give the exact information as to what’s going wrong.
Please also update to 4.0.5 prior as that’s the latest version now and has a lot of fixes, including one for when the path contains curly braces ({/}) that could help here if VMware Workspace ONE cache folders are named by UUID or something.
I downloaded the 4.0.5 version, did not modify anything, wrapped it into a .zip file and uploaded to UEM with the following install command: .\ServiceUI_x64.exe -Process:explorer.exe Invoke-AppDeployToolkit.exe
No log is created, UEM only gives the message: Cannot install
But! When I run the Invoke-AppDeployToolkit.exe from the cache folder(which has the { /}) it runs perfectly.
So, I added a detection rule script in UEM. The same one I always used for Intune. Somehow UEM could not work with this script. After I removed the script, it showed as how it should be.