Development
Developing scripts in VS Code
Last updated
Developing scripts in VS Code
Last updated
The Visual Studio Code extension for PowerShell Universal provides integration for working with automation. We recommend you also install the PowerShell extension.
To add scripts to the Universal platform, you can do it via the admin console or the file system. The Visual Studio Code extension also provides integration for managing the scripts.ps1
configuration file.
The Scripts tree view will provide access to each of your scripts, the admin console the scripts.ps1
file.
To add a new script to the Universal platform, you can create the PS1 file on the file system and then add the script to the scripts.ps1
. The file name is relative to the repository folder. You can also use fully qualified file paths.
To edit a script in VS Code, click the Edit Script button.
The script will open in the VS Code editor.
You can start scripts by clicking the Run Script button. This will start a Universal Automation job. You'll get notifications of the job's progress in VS Code.
You can edit schedules for scripts by editing the schedules.ps1
file. A link to the file is available in the configuration tree view.
Schedules are defined using New-PSUSchedule
cmdlet.