简体   繁体   English

未登录帐户时,SCVMM PowerShell命令在任务计划程序中不起作用

[英]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.

相关问题 Powershell的任务计划程序不起作用 - Task Scheduler with powershell not working 通过任务计划程序运行时,Powershell脚本停止工作 - Powershell script stops working when ran through task scheduler 由任务调度程序运行时,Powershell 脚本无法正常工作 - Powershell scripts not working properly when run by task scheduler 在“运行是否登录用户”模式下,使用任务计划程序运行Powershell脚本会冻结 - Running Powershell script using Task Scheduler freezes when in “Run whether user is logged in or not” mode 当用户未登录时,修改 Word 文件的 PowerShell 脚本不适用于任务计划程序 - PowerShell script that modifies Word file doesn't work with Task Scheduler when user isn't logged on 由Task Scheduler启动的Powershell脚本不起作用 - Powershell Script started by Task Scheduler not working 通过任务计划程序的 Powershell 脚本不使用参数 - Powershell Script via Task Scheduler Not Working with Arguments 在任务计划程序中设置时,PowerShell脚本未运行 - PowerShell Script not running when set in the task scheduler 从Windows Task Scheduler调用Powershell的Invoke-Command时不起作用 - Powershell's Invoke-Command not working when called from Windows Task Scheduler Powershell Monitor任务计划程序 - Powershell monitor task scheduler
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM