PSScheduledJob only works with positional parameters in ArgumentList

When using scheduled jobs in PowerShell v3 you can pass parameters to the scheduled job via the “ArgumentList” parameter. However, you can only pass values via its position (instead via its name) as the parameter expects an array of objects:


So it is not possible to run any of your scripts as “scheduled jobs” when they expect only names parameters. You have to revert to “traditional” task scheduler invocation via “powershell.exe -File <DRIVE:\PATH\SCRIPT.PS1>”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: