/build/static/layout/Breadcrumb_cap_w.png

Calling PowerShell script via K2000: Return code 2 System cannot find file specified

Have 2 postinstall tasks that get error in Kace (K2 v 3.6), error is return code 2, System cannot find file specified.  I have Kace stop on error and when I look at the Kace\apps\id# folder I can see the powerShell script there.  The command line of the the 2 post install scripts is:

powershell.exe -nologo -executionpolicy bypass -WindowsStyle hidden -noprofile -file "script.ps1"  

get error no matter if have " or not.  Any one have any idea why Kace cannot see the Powershell script in it's own folder?  Also When Kace stops I manually run the Powershell scripts from the Kace folder and they run with no errors.  I have tried this install on a Windows 8.1 and Win 7 and get same result.  


3 Comments   [ + ] Show comments
  • when you look at the tasks xml file what "file type" does the task id think it is? - SMal.tmcc 9 years ago
  • good question, is there any log in kace that would show that to me or do I need to try the scripted install again? - bflood2000 9 years ago
    • yea see the answer I posted so you can see the screen shots - SMal.tmcc 9 years ago
  • Ok thanks very much. The File type is listed as exe on both the scripts. As for the other suggested fix I had found and tried that solution before I tried this current and was getting the same result. How would I get kace to see this as the proper file type? - bflood2000 9 years ago

Answers (1)

Posted by: SMal.tmcc 9 years ago
Red Belt
0

on the kbox hover your mouse over the scripted install

look at the bottom of your browser and get the image id number.  In this case it is 4

 

then open the ikbox share

\\ikbox\peinst

and go to the scripts and find that task (task_4.xml in this case) and open in notepad


Comments:
  • also if you seach on itninja using
    k2000 3.6 powershell
    you will see this solution they came up with
    http://www.itninja.com/question/k2000-3-6-and-powershell-scripts - SMal.tmcc 9 years ago
 
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