[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
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
?
323 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
Previously, on our Nano Server Deployment series, we've created a new nano server image and deployed it on a physical server in part 2. Now we will go through configuration.
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 …
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

650 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