我在 Windows 10 中有几个任务最近失败了。我最近没有对服务器进行任何更改。这些任务多年来一直运行良好,然后在 2017 年 12 月开始失败。我已将 Scheduler 任务配置为在系统启动时运行。当我检查“历史记录”选项卡时,我看到:
Task Start Failed error: Additional Data: Error Value: 2147943712.
任务/常规选项卡配置如下:
Run whether user is logged on or not
Do not store password.
Run with highest privileges
Configure for Windows 10
用户帐户是“Admin”。该用户没有密码,并且是管理员。它位于安全的房间和安全的子网中,所以我不想在工作站上设置密码。
当我尝试从“选定项目/运行”选项运行任务时,调度程序会记录相同的错误。根据其他帖子,我尝试编辑用户帐户,重新输入管理员并按下检查名称按钮。它显示 SERVERNAME\Admin,并且不提示输入密码。我查看了此technet 博客条目。所描述的安全策略已被禁用。
我检查了 RegEdit 中的以下条目,它已被设置为零。
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa
Value Name: disabledomaincreds
Value Type: REG_DWORD
Values: 0 (allow domain credentials to be stored)
我该如何配置任务管理器以使其不产生此错误?以下是该任务的示例 XML:
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2015-04-20T16:55:15.6868362</Date>
<Author>ParishServer1\Admin</Author>
<Description>Oracle Backup</Description>
<URI>\OracleBackup</URI>
</RegistrationInfo>
<Triggers>
<CalendarTrigger>
<StartBoundary>2015-04-20T17:00:00</StartBoundary>
<Enabled>true</Enabled>
<ScheduleByWeek>
<DaysOfWeek>
<Sunday />
</DaysOfWeek>
<WeeksInterval>1</WeeksInterval>
</ScheduleByWeek>
</CalendarTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<UserId>S-1-5-21-3901234542-781488667-2331813244-1001</UserId>
<LogonType>S4U</LogonType>
<RunLevel>HighestAvailable</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>StopExisting</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>false</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<IdleSettings>
<StopOnIdleEnd>true</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
<UseUnifiedSchedulingEngine>true</UseUnifiedSchedulingEngine>
<WakeToRun>true</WakeToRun>
<ExecutionTimeLimit>PT1H</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>C:\SS_Library_Backups\LibraryBackup.cmd</Command>
<WorkingDirectory>C:\SS_Library_Backups</WorkingDirectory>
</Exec>
</Actions>
</Task>