gpt4 book ai didi

powershell - 远程Powershell和不等待用户输入的提示

转载 作者:行者123 更新时间:2023-12-02 23:45:34 29 4
gpt4 key购买 nike

我有调用schtasks.exe的脚本,以导入导出的xml任务。直接在服务器上执行脚本时,Schtasks.exe会提示您输入用户密码。

当我使用远程Powershell调用同一脚本时,我会得到以下信息:

[remote_server]: .\install.ps1
SUCCESS: The scheduled task "monitor.ps1" has been terminated successfully.
SUCCESS: The scheduled task "monitor.ps1" was successfully deleted.
Please enter the run as password for MYDOMAIN\myuser:
schtasks.exe : ERROR: The system cannot find the file specified.

问题是 Please enter the run as password for MYDOMAIN\myuser:行,通常我可以在其中输入登录用户的密码,但是对于远程Power Shell session ,这永远不会发生。

最佳答案

关于powershell - 远程Powershell和不等待用户输入的提示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24036771/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com