Page 1 of 1

[SOLVED] setuphelpers.run_powershell

Published: November 14, 2023 - 09:12
by bkeller
Good morning,

After research and various tests, I am unable to use and find information regarding the possibility of doing "multi-line" with the run_powershell function.

https://www.wapt.fr/apidoc/wapt-2.4/win ... powershell

Code: Select all

 setuphelpers.run_powershell(cmd, output_format='json', **kwargs)[source]
Run a command/script (possibly multiline) using powershell, return output in text format If format is 'json', the result is piped to ConvertTo-Json and converted back to a python dict for convenient use
Do you have any examples or documentation on this topic?

THANKS
Sincerely

Re: setuphelpers.run_powershell

Published: July 17, 2026 - 6:24 PM
by sterobo
It's probably a bit late, but if anyone is looking for the information:

Code: Select all

cmd = """
# start script
# ...
# end script
"""
run_powershell(cmd,output_format='text')