Home Forums Programming Powershell Passing Parameter to SQl Agent Job that runs powershell RE: Passing Parameter to SQl Agent Job that runs powershell

  • I use the Operating system (CmdExec) type to run Powershell scripts from jobs instead of the Powershell type. For parameters in that type just add them after the script name. Here's a command example from something that works for me.

    C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe -NoProfile -WindowStyle Hidden -Command E:\temp\someScript.ps1 param1 param2 33