Solved

How to execute powers he'll script using task scheduler in windows 2008 r2 sp1 server!

Posted on 2013-10-22
3
312 Views
Last Modified: 2013-11-01
Hello there,

I am trying to run the following power shell command  via task scheduler in windows 2008 r2 server. But it us not getting executed.

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command “C:\temp\NowVDI2.ps1”

Please advise if I am missing any parameters in the above command line.

Thanks and regards
0
Comment
Question by:goprasad
  • 2
3 Comments
 

Author Comment

by:goprasad
ID: 39593291
Please advise
0
 

Author Comment

by:goprasad
ID: 39593309
Please if someone could assist?
0
 
LVL 14

Accepted Solution

by:
Raj-GT earned 500 total points
ID: 39593670
Change the "-command" option to "-file" when calling a script file. See the link below for some step by step instructions.

http://blogs.technet.com/b/heyscriptingguy/archive/2012/08/11/weekend-scripter-use-the-windows-task-scheduler-to-run-a-windows-powershell-script.aspx
0

Featured Post

Want to promote your upcoming event?

Attending an event? Speaking at a conference? Or exhibiting at a tradeshow? Easily inform your contacts by using a promotional banner in your email signature. This will ensure your organization’s most important contacts are in the know.

Join & Write a Comment

You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
The viewer will learn how to dynamically set the form action using jQuery.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now