Use Scripts to run PowerShell code for endpoint configurations on Windows Desktop devices using Workspace ONE UEM.
Scripts is a Freestyle feature that is available for SaaS environments. For details on Freestyle, access Freestyle Orchestrator.
With Scripts, located in the main navigation under Resources, you can push code to Windows devices to do various processes. For example, push a PowerShell script that notifies users to restart their devices.
Use Variables in your scripts to protect sensitive static data like passwords and API keys, or use lookup values for dynamic data such as device ID and user name. You can also make this code available to your Windows users so they can run it on their devices when needed. Make code available by integrating the Workspace ONE Intelligent Hub with Scripts so that users can access the code in the Apps area of the catalog.
Important: Scripts are not permitted to be assigned to Employee-Owned devices for privacy reasons.
You can find out if Scripts ran successfully using the Scripts tab in a device's Device Details page. In the Workspace ONE UEM console, go to the applicable organization group, select Devices > List View, and choose an applicable device. On the Scripts tab, look in the Status column for a Executed or Failed status. Statuses depend on the exit code (also known as error code or return code).
Scripts for Windows Desktop managed by Workspace ONE UEM supports using PowerShell to execute codes on end user devices. Integrate Scripts with the Workspace ONE Intelligent Hub for Windows and enable self-service to Scripts for your users.
Note: If you are publishing scripts to less than 2000 (default value) devices, the devices are notified immediately to fetch the resource. However, if the smart groups assigned have more than 2000 devices, then the devices will receive the resource the next time the devices checks-in with Workspace ONE UEM console.
Navigate to Resources > Scripts > Add.
Configure the script settings for the General tab.
|Name||Enter a name for the script.|
|Description||Enter a description for the script.|
|App Catalog Customization||Enable offering self-service access to Scripts in the Workspace ONE Intelligent Hub catalog.
Display Name - Enter the name that users see in the catalog.
Display Description - Enter a brief description of what the script does.
Icon - Upload an icon for the script.
Category - Select a category for the script. Categories help users filter apps in the catalog.
Although you have completed the settings for the script in the catalog, there is another configuration to set to display your script in the Workspace ONE Intelligent Hub. When you assign the script to devices, enable the Show in Hub menu item or these customizations do not display in the catalog.
Configure the script settings for the Details tab.
|Language||Workspace ONE UEM supports PowerShell.|
|Execution Context||This setting controls whether the script runs in the user or system context.|
|Execution Architecture||This settings controls whether the script runs on a device based on the architecture. You can limit the script to run on 32-bit devices or 64-bit devices only or to run the script based on the device architecture. You can also force the script to run as 32-bit regardless of the architecture of the device.|
|Timeout||In case the script gets looped or is unresponsive for some reason, enter a length of time in seconds for the system to run the script and then stop.|
|Code||Upload a script or write your own in the text box provided.|
Select Next to configure the Variables tab.
Add static values, such as API keys, service account names or password by providing the key and the value of the variable. Or, add dynamic values such as enrollmentuser by providing a key and then selecting the lookup value icon. To use variables in a script, reference the variable by using
$env:key. For instance, if the variable definition has a key named SystemAccount and a value of admin01, the script can assign the variable to a script-variable, named account by referencing
$account = $env:SystemAccount.
To assign Scripts to devices, select the script, choose Assign, and select New Assignment.
On the Definition tab, enter the Assignment Name and use the Select Smart Group menu item to select the group of devices you want to push Scripts to.
On the Deployment tab, for Triggers, select the trigger that starts the script. You can select multiple triggers.
Enable Show In Hub to show your App Catalog Customization settings for the script in the Workspace ONE Intelligent Hub. You can disable this option to hide a script from users in the catalog.
What to do next
Go to the Scripts tab in a device's Device Details to view the status of your Scripts.