Page 1 of 1

EXE with Exchange powershell

Posted: Tue Aug 27, 2019 11:18 am
by userausera

Product, version and build: Studio

Have a question for studio.

I have a development windows 10 machine with Microsoft exchange Powershell installed, the script working no any issues.

if I compile it to an EXE file, it will works on this development machine no issue.

But if the TARGET machine is a normal windows 10 machine, say clean new installed (for sure no Microsoft exchange powershell installed). Can I still run that EXE file without issue?

Thanks and Best Regards,

Re: EXE with Exchange powershell

Posted: Tue Aug 27, 2019 11:34 am
by Alexander Riedel
No, it will not work. Its not compiler, its a packager. Any dependencies you have must also exist on the target machine.
The underlying mechanism is still PowerShell, so any snapins, modules etc you use must be present.

Re: EXE with Exchange powershell

Posted: Tue Aug 27, 2019 11:58 am
by userausera
Thanks Alexander,

Any workaround base on using studio.


Re: EXE with Exchange powershell

Posted: Wed Aug 28, 2019 2:29 am
by Alexander Riedel
Three ways this is usually done.

1. You create one script and package it as an executable that checks if all the stuff you need is there. If yes, it launches the main application.
This way you check every time the application is launched. If something is missing, you launch the appropriate installer(s) from your network or the internet.

2. You create an MSI with PowerShell Studio to properly install your application. In a custom action you check if what you need is there and if not, you install it.
The check for prerequisites in only on install that way.

3. Your script in your application checks in the beginning if all what is needed is present. If not display an error with instructions for the user what to do and fail gracefully.