PowerShell
Run PowerShell Script
Last updated
Run PowerShell Script
Last updated
Write a PowerShell script in the Low-Code editor and execute it. The standard text output generated by the script will be written to the output.txt file in the workspace. Please refer to the provided documentation or link for guidance on how to use PowerShell scripts.
Document variables in PowerShell scripts are supported in version 2.2.20230225 and later. When the option is turned on, the %FILENAME% string in the PowerShell script will be replaced with the content of [FILENAME].txt in the workspace.
When the %VAR% function is enabled, it's important to avoid using the percentage symbol (%) in script comments (# at the beginning). The Low-Code editor supports sequential execution of commands (Cmdlets), meaning that commands are executed line by line from top to bottom. If you need to implement more advanced flow control, such as using for, foreach, if, switch, while, or until statements, you should save the script as a .ps1 file and then call it from the Low-Code environment:
In Windows PowerShell, there is a default restriction on running .ps1 script files. To overcome this restriction, you can open Windows PowerShell in Administrator mode (Run as Administrator) on your Windows system and use the Set-ExecutionPolicy command to update the setting to RemoteSigned. Here's how you can do it:
PowerShell Low-Code can be used to automate various Microsoft Office applications, such as running a VBA macro in a specific Excel file:
--
We are dedicated to improving our content. Please let us know if you come across any errors, including spelling, grammar, or other mistakes, as your feedback is valuable to us! 🤖️⚡️