我试图在PowerShell的远程服务器上运行一个.cmd文件.
在我的ps1脚本中,我已经尝试过:
C:\MyDirectory\MyCommand.cmd
导致此错误:
C:\MyDirectory\MyCommand.cmd is not recognized as the name of a cmdlet,function,script file,or operable program.
和这个
Invoke-Command C:\MyDirectory\MyCommand.cmd
导致此错误:
Invoke-Command : Parameter set cannot be resolved using the specified named parameters.
我不需要将任何参数传递给powershell脚本.我正在寻找什么正确的语法?
原文地址:https://www.jb51.cc/windows/371612.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。