Deploy-Application.exe - Execute Powershell-Command

Hi @ All

First of all, I apologies if I ask here a question that already was answered in another post.
I’m very new to the whole theme and also my English skills are pretty far from good.

Hope you get what I want to ask you!

Here the question:
I would like to execute the following Powershell-Command with the Deploy-Application.exe:

powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -File Decrypt.ps1 1,0,5,9,56,34,254,211,4,4,2,23,42,54,33,200,1,34,2,7,6,9,35,37

I think I must do it with the command “Execute-Process”.

If any other information is necessary to help me, please let me know.

Kind regards & Thank you!
Broman

Hello,

if youre new to the toolkit, here is a nice guide you can take a look at - Great beginners guide to PSAppDeployToolkit

When it comes to your question, you are not forced to use Execute-Process but it is recommended to do so since it offers many good features.

You could use it this way:

Execute-Process -Path "powershell.exe" -Parameters "-ExecutionPolicy Bypass -WindowStyle Hidden -File Decrypt.ps1 1,0,5,9,56,34,254,211,4,4,2,23,42,54,33,200,1,34,2,7,6,9,35,37" -CreateNoWindow $true
1 Like

Hi Luki1412,

Thank you very much for your help and the Link to the beginners’ guide!
Brilliant to have such an active community here.
It works perfectly fine with your solution!

Best regards
Broman

1 Like