windows – 通过PowerShell运行.cmd文件
发布时间:2020-09-01 17:24:32 所属栏目:Windows 来源:互联网
导读:我试图使用PowerShell在远程服务器上运行.cmd文件。 在我的.ps1脚本中,我试过这个: C:MyDirectoryMyCommand.cmd 它导致此错误: C:MyDirectoryMyCommand.cmd is not recognized as the name of a cmdlet,function, script file, or operable progra
我试图使用PowerShell在远程服务器上运行.cmd文件。 在我的.ps1脚本中,我试过这个: C:MyDirectoryMyCommand.cmd 它导致此错误: C:MyDirectoryMyCommand.cmd is not recognized as the name of a cmdlet,function,script file,or operable program. 和这个 Invoke-Command C:MyDirectoryMyCommand.cmd 导致此错误: Invoke-Command : Parameter set cannot be resolved using the specified named parameters. 我不需要将任何参数传递给PowerShell脚本。我正在寻找的正确语法是什么? invoke-item 将查找文件类型的默认处理程序并告诉它运行它。它与在资源管理器中双击文件或使用start.exe基本相同。 (编辑:哈尔滨站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 命令行 – 批处理脚本 – 更改桌面上文件夹的图标(Windows
- Windows下wamp php单元测试工具PHPUnit安装及生成日志文件配
- .net – 在Windows应用程序中格式化标签内的文本
- api-ms-win-crt-runtime-|1-1-0.dll丢失的解决方法
- Windows – 无法从GitBash运行TASKKILL
- windows修改PowerShell(命令提示符)默认中文编码方式
- .net – Windows Azure Web角色缓存(预览)“挂起”使模拟器
- win7运行mapreduce报错Could not locate executable nullbi
- windows – dokan sshfs有多稳定?
- windows – JScript:如何运行外部命令并获得输出?
推荐文章
站长推荐
- 如何使用GUI独立于.NET或其他Libs为Windows制作便
- Microsoft Windows远程桌面协议中间人攻击漏洞(C
- 有没有办法在Windows cli中使用’COPY’命令(Pos
- 在Windows上使用clang编译c 11程序时出错
- windows – CreateWindowEx的lpClassName参数如何
- .net – 为什么我无法在2.0.0.0播放器框架中重用
- 在Windows上连接到GitHub时出现问题,甚至是通过P
- windows下编译支持https的libcurl
- windows – 为什么模拟会话中定义的DOS设备不会出
- winapi – Windows XP与Vista的SetThreadUILangu
热点阅读