Powershell script not running properly from SCCM [closed]

冷暖自知 提交于 2019-12-10 15:34:48

问题


I'm trying to deploy Lego MindStorms through SCCM. I have a PowerShell script that I'm using to start the EXE and do some other things after the install. The PS1 file sits in the same directory as the EXE. The PowerShell script tries to run after the package gets downloaded, but the program doesn't get installed. I can go into the cache folder where the package was downloaded, right click the script and tell it to run, and the install kicks off fine.

This is what I put in the command line for the program in SCCM:
powershell.exe -executionpolicy bypass -file .\Install_MindStorms.ps1

I have also tried the same command as above without the .\ before the file name.

What is happening differently here where I can manually run the PS1 file from the downloaded package, but the same file isn't working correctly when it is run automatically through the advertised program after it has been downloaded from the distribution point?

来源:https://stackoverflow.com/questions/6881090/powershell-script-not-running-properly-from-sccm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!