简体   繁体   English

Powershell脚本计划的任务停止运行(无法启动)

[英]Powershell Script Scheduled Task Stopped Running (Could not Start)

I'm running a scheduled task (for Powershell Script) on Windows 2003 Server. 我正在Windows 2003 Server上运行计划的任务(针对Powershell脚本)。 I believe the script works fine. 我相信该脚本可以正常运行。 The task is scheduled to run every 10 minutes from 7:00am to 11:50pm everyday. 该任务计划每天从7:00 am到11:50 pm每10分钟运行一次。 However, it never gets to run more for than a day. 但是,运行一天之久都不会超过一天。 It always stops some time in the afternoon (between 2pm and 6pm). 它总是在下午的某个时间(下午2点至下午6点之间)停止。 I'm not sure exactly what happened but I always get the error 我不确定到底发生了什么,但是我总是得到错误

The attempt to log on to the account associated with the task failed, therefore, the task did not run.
The specific error is:
0x80070569: Logon failure: the user has not been granted the requested logon type at this   computer. Verify that the task's Run-as name and password are valid and try again. 

It seems like most people with this error are saying that they need to make user "logon as a batch job". 似乎大多数出现此错误的人都在说他们需要使用户“以批处理身份登录”。 However, this option is greyed-out for me. 但是,此选项对我来说是灰色的。 I search for other places where users have similar problems but the solutions are not written in detail (some of them have something to do with GPO). 我搜索其他用户遇到类似问题但解决方案未详细写出的地方(其中一些与GPO有关)。 I've only used the basic features of Windows Server and I have no clue how to get to the place they are referring to. 我只使用了Windows Server的基本功能,却不知道如何到达它们所指的位置。

Can someone please confirm whether "logon as a batch job" is indeed a solution and provide a detailed walkthrough on how to solve my problem? 有人可以确认“批量登录”是否确实是一种解决方案,并提供详细的演练以解决我的问题?

Thanks, 谢谢,

That is indeed the issue. 这确实是问题。 The reason you can't set this value could be related to Group Policy. 您无法设置此值的原因可能与组策略有关。 Is the server in a domain? 服务器在域中吗? If so, please check group policy as described in the following article from Microsoft: 如果是这样,请按照Microsoft以下文章中所述检查组策略:

http://technet.microsoft.com/en-us/library/cc755659(v=ws.10 ) http://technet.microsoft.com/zh-CN/library/cc755659(v=ws.10

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM