Question : Adding arguments to a powershell scedual task

I want to make a schedulde task to run one of my powershell scripts. The script requires an argument, but I don't know how to incorporate that on the command line.

The follow code gives this error:

The term 'c:\scripts\ps\wol.ps1 C:\logs\comp-groups\us-lab.txt' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and  try again.
Code Snippet:
1:
C:> powershell "& 'c:\scripts\ps\wol.ps1 C:\logs\comp-groups\us-lab.txt'"
Open in New Window Select All

Answer : Adding arguments to a powershell scedual task

You can be a little more specific if you wish by doing this
1:
powershell -command "& 'c:\scripts\ps\wol.ps1' -ParameterName C:\logs\comp-groups\us-lab.txt"
Open in New Window Select All
Random Solutions  
 
programming4us programming4us