How to run a powershell script to generate exe in ubuntu with ps2exe package

Bhavneet Singh 0 Reputation points
2023-05-26T11:25:27.0833333+00:00

Hi All,

How to make powershell script to generate exe in ubuntu with ps2exe package.

My script is working fine in Windows OS but the same script not working in Ubuntu. I need to run this script in Ubuntu because I have only one AWS cloud server which is working on Ubuntu OS.
I have installed Powershell with the ps2exe extension in Ubuntu. but it not working fine.
I have no idea how to solve the following error and Is it possible to generate an exe file from a PowerShell script with ps2exe in Ubuntu ?

Thanks

/home/mypc/.local/share/powershell/Modules/ps2exe/1.0.12/ps2exe.ps1:2762
Line |
2762 |      $cr = $cop.CompileAssemblyFromSource($cp, $programFrame)
     |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Exception calling "CompileAssemblyFromSource" with "2" argument(s): "Operation is not supported on this platform."
Invoke-ps2exe: Output file /var/www/html/script/home/remote/aithentic-agent-win-installer.exe 
not written

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
4,893 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
736 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 39,011 Reputation points
    2023-05-26T18:08:07.14+00:00

    The error message is pretty explicit: "Operation is not supported on this platform."

    0 comments No comments