?
Solved

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

Posted on 2013-10-22
3
Medium Priority
?
321 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

800 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