[英]SCVMM PowerShell commands not working in Task Scheduler when account is not logged in
I am trying to run a script with the Task Scheduler. 我正在尝试使用“任务计划程序”运行脚本。 It works just fine when the user is logged in, but when I try to run it when the user is not logged in, the command
Get-SCVirtualMachine
returns null. 当用户登录时,它工作得很好,但是当我尝试在用户未登录时运行它时,命令
Get-SCVirtualMachine
返回null。
The script does run, but just that command doesnt return any value when I am running it without the service account being logged in. 该脚本可以运行,但是当我在未登录服务帐户的情况下运行该命令时,该命令不会返回任何值。
Of course I have the "Run wether user is logged on or not" flag set to true. 当然,我将“是否运行用户是否已登录”标志设置为true。 And as I said, the script gets executed, just that SCVMM cmdlet isn't working.
就像我说的,脚本被执行了,只是SCVMM cmdlet无法正常工作。
The Solution was to add the service account as a local administrator. 解决方案是将服务帐户添加为本地管理员。 Somehow i totally forgot that.
不知何故,我完全忘记了。 Therefore it could'nt load the needed PS Modules.
因此,它无法加载所需的PS模块。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.