首页 > 解决方案 > 注销服务器时任务计划程序作业失败

问题描述

我通过任务计划程序创建了一个 PowerShell 脚本。这个 ps1 基本上在 SQL 服务器中执行存储过程,然后刷新 Excel 表以获取最新数据。如果我已登录服务器,则任务计划程序作业运行良好,但当我从服务器注销时,它会失败并出现以下错误。

New-Object : Retrieving the COM class factory for component with CLSID 
{00024500-0000-0000-C000-000000000046} failed due to the following error: 8000401a The server 
process could not be started because the configured identity is incorrect. Check the username and password. (Exception from HRESULT: 0x8000401A).

注意:我已经在任务计划程序中完成了此设置:“无论用户是否注销都运行”,所以这不是问题。

标签: windowspowershelltaskscheduler

解决方案


推荐阅读