Software Deployment Question

Need command line to deploy ps1 script via sccm 2007.

06/29/2017 1663 views

I am trying to depoly a ps1 script via sccm 2007, the command line im using is
"powershell.exe -command .\install.ps1"

when i run the advertisement, i get this error below, can anyone advise of any other command line to use.  We are using Powershell V2, which is part of Windows 7 as standard

Thanks in advance
1 Comment   [ + ] Show comment


  • Hi, Not sure if this will help but the way I deploy our PS scripts is having a windows.bat file with the following;

    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe Set-ExecutionPolicy Unrestricted
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe "\\Share\rollout\Script.ps1"


    At the end of my PS script I restrict again.

Be the first to answer this question

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