Publish scripts globally
Windows scripts can be published centrally and thus made available to all organizations. This is done in the Global organization.
Add script
Once logged in to the Global organization, the Scripts section can be reached via the navigation on the left-hand side, where new scripts can be created using the Add button. The creation is divided into 3 points.
General
- Name - The global display name for the script (required, maximum 255 characters)
- Description - A supplementary description of the script (maximum 4000 characters)
- Platform - For Windows scripts, Windows is selected (required, preselected).
*.ps1files and the Environment variables field are only offered for Windows. The platform cannot be changed after saving and is also locked while a script file is loaded.
Content
- Script file - A local
*.ps1file can be loaded using Select (or by drag and drop). Its content is transferred to the Content field. - Content - Alternatively, the script can be entered directly in the text field. As soon as the field contains text, Script file is hidden.
Execution
- Timeout (in minutes) - After the specified time period has expired, the script execution is forcibly aborted. Default: 5 minutes, permitted range: 1 to 30 minutes.
- Environment variables - The environment variables and their assigned values are inserted at the beginning of the script when it is executed on the device (maximum 512 characters). Each variable assignment except the last one must end with a semicolon. The variables can be used in the script by their names.
Example:
# Variables (field "Environment variables")
$arg1=10; $arg2='text'
# Use in the script
Write-Host $arg1
# Execution on the device: ./test.ps1
# Result output: 10
Available placeholders
The available placeholders can be used both directly in the script content (Content point) and in the Environment variables field under Execution. The placeholders available in the form are displayed below the input fields. Example of a variable: $serial='${device.serialnumber}'. Further functions such as substrings or default values are described in the article Advanced placeholders →.
Set script visibility to global
After saving, the script is only visible in the Global organization. To provide it to all organizations, the script is selected in the list under Scripts, and Set visibility to global is chosen in the context menu (three-dot menu of the row or of the action bar). The following dialog lists the affected scripts; Publish applies the change. The function requires the permission to edit scripts.


In the other organizations, the script then appears read-only in the From Global tab of the script list. It can be used there in a policy with the Windows Script Configuration → or via the Execute PowerShell script action. As long as the script is used in a published policy of any organization, it cannot be deleted, not even in the Global organization.
In a meta organization, the same function is available as Set visibility to meta; the script is then visible in the organizations of this meta organization.