0

I need to run via a taskscheduler a simple powershell script that backups my sharepoint farm.

When I copy paste the command on the shell it works perfectly fine.

However on the task scheduler it says parameter its incorrect.

enter image description here

The command is very simple:

powershell -file "\\10.116.2.12\nasbk02\BKPORTAL\BackupFarm.ps1"

enter image description here

2
  • 2
    Move everything after PowerShell into arguments. So it should be -File .... in Add Arguments. If that does not work use the full file path to PowerShell.exe Commented Dec 30, 2014 at 2:45
  • What is the ExcecutionPolicy on this server set to? Commented Dec 30, 2014 at 11:50

1 Answer 1

2

All parameters must go into the Add arguments (optional) box:

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.