在任务计划程序下将mstsc.exe作为批处理作业运行

时间:2015-11-13 14:44:09

标签: windows batch-file scheduled-tasks windows-server-2008-r2

我正在尝试自动登录到2008 R2服务器上的一堆RDP客户端,当从桌面运行双击批处理文件时,下面的批处理工作正常,但是在将.bat文件设置为运行时没有任何反应来自任务计划程序的任务

@ECHO off

ECHO This .bat is used to automatically RDP in to the specified servers
ECHO which are contained within this file. Ensure you have logged in to
ECHO these servers beforehand and checked 'save credentials' otherwise
ECHO this batch file won't work as intended.
ECHO.
ECHO Beginning login...
ECHO.

ECHO Beginning login - Server ADMIN...
start mstsc.exe /v:00.00.00.00 /admin

PAUSE

计划任务设置为在管理员帐户下运行(仅一个可用),并且(开始)可选字段也已设置为“C:\ Users \ Administrator \ Desktop \”。

1 个答案:

答案 0 :(得分:0)

结果显示mstsc.exe仅在用户帐户登录时有效...因此,在“常规”选项卡的“安全”选项下,确保选中“仅在用户登录时运行”。