Important: Distribution tasks are executed in the context of the SYSTEM user. Remember that the script does not run in the context of the currently logged-in user. Avoid references to the user profile unless they are necessary.
Table of contents:
1. PowerShell – running a command
Example – disabling BitLocker on drive C:
File or command to run:
powershellParameters:
-command "Suspend-BitLocker -MountPoint "C:" -RebootCount 1"- In the Files tab, uncheck Copy files.
- Go to the Execute tab and fill in File or command to run and Parameters according to the example:
- In the Devices tab, select the computers with Agents installed on which you want to run the command.
2. PowerShell – running a .ps1 script
Use the same example, but saved in a .ps1 file.
- In the Files tab, add a .ps1 file or another file name with the .ps1 extension.
-
In the Execute tab, enter the following in the Parameters field:
-noprofile .\(file name).ps1In our example:
-noprofile .\pslist.ps1 - In the Devices tab, select the computers with Agents installed on which you want to run the script.
3. CMD – running a command
Example – saving the ipconfig output to a .txt file.
File or command to run:
cmd /cParameters:
ipconfig /all > C:\ipconfig2.txt- In the Files tab, uncheck Copy files.
- Go to the Execute tab and fill in File/command to run and Parameters according to the example:
- In the Devices tab, select the computers with Agents installed on which you want to run the command.
4. CMD – running a .bat file
Use the same example, but saved in a .bat file.
-
In the Files tab, add the cmd.bat file or another file name with the .bat extension.
- In the Devices tab, select the computers with Agents installed on which you want to run the command.
After saving the task, check its status and execution result on the selected devices.