/build/static/layout/Breadcrumb_cap_w.png

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?

0 Comments   [ + ] Show comments

Answers (2)

Posted by: dchristian 12 years ago
Red Belt
2
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.

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 11 years ago
Posted by: worzie 11 years ago
Fourth Degree Brown Belt
0

I thought I had tested a script to run without this but another box gave me the error you mention.  Check the box for Allow Run While Logged Off.

My script is a boot up run script, so, you would naturally think it wasn't necessary.

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ