I am trying to get a powershell script to run and keep getting "Skipping because not allowed to execute logged off"
The details are(as of my last test):
On Success
Launch “SYS\Cmd†with params “/C powershell -nologo -executionpolicy bypass -noprofile -file $(KACE_DEPENDENCY_DIR)/opsview_downtime-2h_NOWv1.0.ps1â€.
I have set the script to login as an admin level user. The script just performs some web requests to set downtime on our monitoring server before patching starts.
I have have also tried running as Local System and get the same error.
thoughts?
On Success
Launch “SYS\Cmd†with params “/C powershell -nologo -executionpolicy bypass -noprofile -file $(KACE_DEPENDENCY_DIR)/opsview_downtime-2h_NOWv1.0.ps1â€.
I have set the script to login as an admin level user. The script just performs some web requests to set downtime on our monitoring server before patching starts.
I have have also tried running as Local System and get the same error.
thoughts?
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
dchristian
12 years ago
What i usually do is run my powershell scripts as shell script. You can upload your ps1 file as a dependency. Then all you need for the script text is:
powershell.exe -nologo -executionpolicy bypass -noprofile -file opsview_downtime-2h_NOWv1.0.ps1
Just make sure you change the script name from script.sh to script.bat. Seems to work pretty well for me.
powershell.exe -nologo -executionpolicy bypass -noprofile -file opsview_downtime-2h_NOWv1.0.ps1
Just make sure you change the script name from script.sh to script.bat. Seems to work pretty well for me.
Comments:
-
Hmm, I am still getting the same error - gwilson185 12 years ago
-
Go to the script in KACE and in Scheduling check Allow Run While Logged Off and sace - PatchMyPC 12 years ago
-
Thank you dchristian, exactly what i needed for my domain join script. - Ax1sMundi 12 years ago
Posted by:
worzie
11 years ago