windows – 通过PowerShell运行.cmd文件
发布时间:2020-12-13 21:34:31 所属栏目:Windows 来源:网络整理
导读:我试图使用PowerShell在远程服务器上运行.cmd文件。 在我的.ps1脚本中,我试过这个: C:MyDirectoryMyCommand.cmd 它导致此错误: C:MyDirectoryMyCommand.cmd is not recognized as the name of a cmdlet,function,script file,or operable program. 和
我试图使用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上安装hadoop
- windows – 如何从命令行获取PID,用username和im
- 错误:不支持使用MSBuild 64位构建Windows Phone
- windows – 如何配置Chocolatey以使用公司代理?
- Windows Phone 7上的Silverlight Web内容
- Emacs for Windows错误加载颜色主题
- 为什么win32上没有c#native编译项目?
- windows-server-2012-r2 – Windows Server 2012
- JsonRequestBehavior不存在问题,JsonRequestBeh
热点阅读