Push Powershell Online Shell Script?
I would like to run a powershell script with the K1000. I have the powershell script as a dependency, and the Script Text as
powershell.exe -executionpolicy unrestricted -file "script.ps1"
I named the script script.bat
When I run the script I receive the following dialog:
2011-10-25 15:09:18: Alert not enabled, moving to next phase....
2011-10-25 15:09:24: Sending script script.bat to client....
2011-10-25 15:09:29: Script sent
2011-10-25 15:09:29: Sending dependency script.ps1 to client....
2011-10-25 15:09:36: Dependency sent
2011-10-25 15:09:36: Executing script....
2011-10-25 15:09:59: Error 1 received while executing script
Does anybody know what error 1 means in this context? Has anybody been able to execute powershell scripts by any other method?
powershell.exe -executionpolicy unrestricted -file "script.ps1"
I named the script script.bat
When I run the script I receive the following dialog:
2011-10-25 15:09:18: Alert not enabled, moving to next phase....
2011-10-25 15:09:24: Sending script script.bat to client....
2011-10-25 15:09:29: Script sent
2011-10-25 15:09:29: Sending dependency script.ps1 to client....
2011-10-25 15:09:36: Dependency sent
2011-10-25 15:09:36: Executing script....
2011-10-25 15:09:59: Error 1 received while executing script
Does anybody know what error 1 means in this context? Has anybody been able to execute powershell scripts by any other method?
0 Comments
[ + ] Show comments
Answers (8)
Please log in to answer
Posted by:
GillySpy
13 years ago
Posted by:
muebel
13 years ago
Posted by:
cmccracken
13 years ago
Posted by:
jrscribner
13 years ago
I ran into this once and the problem was a space in one of the directories messed up the path to the powershell script so the script was never executed, my solution was to call the Powershell EXE directly with the following settings:
Launch a program:
Directory: C:\Windows\System32\WindowsPowerShell\v1.0
File: PowerShell.exe
Parameters: -nologo -executionpolicy bypass -noprofile -file "$(KACE_DEPENDENCY_DIR)\PowerShellScript.ps1"
Launch a program:
Directory: C:\Windows\System32\WindowsPowerShell\v1.0
File: PowerShell.exe
Parameters: -nologo -executionpolicy bypass -noprofile -file "$(KACE_DEPENDENCY_DIR)\PowerShellScript.ps1"
Posted by:
muebel
13 years ago
Thanks for the tip jrscribner.
I configured an online shell script with the powershell script as a dependency, and the batch script as:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -nologo -executionpolicy bypass -noprofile -file "$(KACE_DEPENDENCY_DIR)\script.ps1"
When I did this I received a new error:
2011-10-25 19:40:49: Executing script....
2011-10-25 19:40:55: Error 4294770688 received while executing script
When I set up the Online KScript as you described... and I seem to have had the same behavior with any way I set it up, I run the script and it just hangs at "status pending"
But yeah, error 4294770688... uh google had nothing to say on that one. Anybody have any idea for the source of this particular error code?
I configured an online shell script with the powershell script as a dependency, and the batch script as:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -nologo -executionpolicy bypass -noprofile -file "$(KACE_DEPENDENCY_DIR)\script.ps1"
When I did this I received a new error:
2011-10-25 19:40:49: Executing script....
2011-10-25 19:40:55: Error 4294770688 received while executing script
When I set up the Online KScript as you described... and I seem to have had the same behavior with any way I set it up, I run the script and it just hangs at "status pending"
But yeah, error 4294770688... uh google had nothing to say on that one. Anybody have any idea for the source of this particular error code?
Comments:
-
hope you already solved it until now. But the Error Code "4294770688" is decimal and in hexadecimal the error means 0xFFFD0000 what seems to me to have to do with the execution policy. I'm getting currently an similar error during installation with sccm and am not able to fix it.. - pippo91 8 years ago
Posted by:
zookdj
12 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.