Need command line to deploy ps1 script via sccm 2007.


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. - djordan 4 years ago

Answers (0)

Be the first to answer this question

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login


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