I have also exported my xml file that you could import and modify as needed.
Manually create a new script with these settings.
Create New Script.
Upload the .ps1 file you want to run and add a task with these settings. Again this is down and dirty. You should probably do a verify task and run this in an "On Success" or somewhere else that would help you in debugging when not running as planned.
Here is an export of the .xml I have. You will have to upload your .ps1 (that you are trying to run) and change the name in the task, but maybe this will help.
Just got Scripts->Choose Action->Import
Paste this xml in the wysiwyg
<?xml version="1.0" encoding="utf-8" ?>
<kbots xmlns="http://kace.com/Kbots.xsd">
<kbot>
<config name="Set LSE Variables" type="policy" id="122" version="1513263821" description="Set variables to be used when in scripting. Put description below in the notes for each one. ">
<dependencies>
<dependency name="/orgs/3/kbots/122/Sample.ps1" checksum="4f5c378ccea4e98597951bd3d4f7c6b5" />
</dependencies>
<execute disconnected="false" logged_off="false">
</execute>
</config>
<compliance>
<verify on_failure="break" attempts="1">
<launch_program path="$(KACE_SYS_DIR)\WindowsPowerShell\v1.0" program="powershell.exe" wait="true" parms="-executionpolicy remotesigned -File $(KACE_DEPENDENCY_DIR)\Sample.ps1" />
<on_verify_success>
</on_verify_success>
<on_verify_failure>
<on_remediation_success>
</on_remediation_success>
<on_remediation_failure>
</on_remediation_failure>
</on_verify_failure>
</verify>
</compliance>
</kbot>
</kbots>
Hope this helps somebody.
Comments