Solved

PowerShell Schedule Task

Posted on 2014-04-21
5
965 Views
Last Modified: 2014-04-21
I have scheduled a Power script under Window Task to run daily. However, it return with error :0x800413F".

If I run it manually, it works fine.

Any idea ? The task has been run under domain administrator.

Tks
0
Comment
Question by:AXISHK
  • 2
  • 2
5 Comments
 
LVL 19

Expert Comment

by:Raheman M. Abdul
ID: 40012263
Try selecting "run with highest privileges"
0
 

Author Comment

by:AXISHK
ID: 40012274
Doesn't make any difference.... Tks
PowerShell.png
0
 
LVL 19

Accepted Solution

by:
Raheman M. Abdul earned 300 total points
ID: 40012278
The error indicates an instance of this task is already running
check the task again for the settings

For details of the errors see: http://msdn.microsoft.com/en-us/library/windows/desktop/aa383604%28v=vs.85%29.aspx

Tick the box "If the task is still running, stop it at this time" to cause the task scheduler to kill the last instance before starting a new one
0
 
LVL 8

Assisted Solution

by:Narender Gakka
Narender Gakka earned 200 total points
ID: 40012312
Hi there,

not sure what exactly your setting are, but here is a very good article on setting up the powershell scripts in windows server task scheduler,

http://community.spiceworks.com/how_to/show/17736-run-powershell-scripts-from-task-scheduler

And also the below article from Microsoft contains all the error codes and related reason for failure..

http://msdn.microsoft.com/en-us/library/windows/desktop/aa383604(v=vs.85).aspx

do verify the settings and let me know if this helps
0
 

Author Closing Comment

by:AXISHK
ID: 40012363
Tks.
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

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…
This article will help you understand what HashTables are and how to use them in PowerShell.
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

831 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