I have PowerShell scripts that I have packaged as executables. But the executable does not run correctly. Part of the script executes Get-ItemProperty and Get-WmiObject. When I run the script in PowerShell they produce the correct results. But when I run the .exe, it does not produce any result. I have required elevation, imported the module, and still can’t get it to work. Hope you all can help!
I read some of the suggested forms below and set the platform = ‘x64’. That seems to fix it. I got to do some more testing but I’ll let you know what I find. Sorry I didn’t find it on my own.