Solved

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

Posted on 2013-10-22
3
317 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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
Windows 10 came with  a lot of built in applications, Some organisations leave them there, some will control them using GPO's. This Article is useful for those who do not want to have any applications in their image (example:me).
The viewer will learn how to dynamically set the form action using jQuery.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

856 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