How do you run a shell script in k2000?
Hi people,
I am trying to run a shell script to install windows updates
as a post install task in the k2000.
Basically how do you run powershell scripts in version 3.7 and upis what I want to know..
I read online that you should save the code below as a batch file.......
xcopy “%~dp0*.*” c:\windows\temp\ /s /y /e
powershell -noprofile -command “Set-ExecutionPolicy bypass LocalMachine”
powershell -file C:\windows\temp\myPowershellScript.ps1
and then zip it up with your shell script and upload to the k2., then call the
batch file in the post install task.
Not working for me....... SO HOW DO I RUN ANY POWERSHELL SCRIPT
IN K2000??
Thanks guys.
Answers (1)
Top Answer
Comments:
-
Thanks chucksteel. Will try it. - akmagnum 8 years ago
-
Hey chuck...
Kace gives me the same error that it was giving me
with other scripts I tried to run from a zip file...
error is...
windows cannot find 'installupdates.bat'. Make sure you type the name correctly, and then try again.
Any ideas??
Thanks - akmagnum 8 years ago-
When you created the zip file did you right click on the batch file and the other file or did you have them in a folder? If you have them in a folder and you compress that folder then they will be inside that folder when uncompressed. You can check the \\k2000\peinst share (you'll need the SAMBA password) to see what the files look like. Look in Applications, the ID of the post-install task, then contents. - chucksteel 8 years ago
-
Ok , I think I have a problem.
I don't have a peinst share in my \\k2000.
I have a "drivers" folder, a "drivers_postinstall" folder, and a "restore"folder.
Why is it I don't have one??
I don't think I deleted it . I wouldn't do that.
How can I get it back?
Thanks! - akmagnum 8 years ago -
The peinst and petemp shares are hidden so if you just browse to the k2000 they won't show, but they are there. - chucksteel 8 years ago
-
Thanks Chuck. All sorted. - akmagnum 8 years ago