Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell 从cmd.exe启动时写入主机不工作_Powershell_Powershell 5.0 - Fatal编程技术网

Powershell 从cmd.exe启动时写入主机不工作

Powershell 从cmd.exe启动时写入主机不工作,powershell,powershell-5.0,Powershell,Powershell 5.0,我有简单的脚本 写入主机“asdasd” 当我用powershell.exe-Version 5-executionpolicy remotesigned-File./script.ps1启动它时 它显示了一个无法找到写入主机的错误 程序“写入主机”无法运行:没有应用程序与此操作的指定文件相关联。ps1:1字符:1 +写入主机“asdasd” + ~~~~~~~~~~~~~~~~~~~. 在script.ps1:1 char:1处 +写入主机“asdasd” + ~~~~~~~~~~~~~~~

我有简单的脚本

写入主机“asdasd”
当我用
powershell.exe-Version 5-executionpolicy remotesigned-File./script.ps1启动它时
它显示了一个无法找到
写入主机
的错误

程序“写入主机”无法运行:没有应用程序与此操作的指定文件相关联。ps1:1字符:1
+写入主机“asdasd”
+ ~~~~~~~~~~~~~~~~~~~.
在script.ps1:1 char:1处
+写入主机“asdasd”
+ ~~~~~~~~~~~~~~~~~~~
+类别信息:ResourceUnavailable:(:)[],ApplicationFailedException
+FullyQualifiedErrorId:NativeCommand失败

这是突然发生的,以前不是问题?

我认为您运行的配置文件缺少modułu Microsoft.Powershell.Utility。您是否有模块使用“获取模块-名称Microsoft.Powershell.Utility”-我有此模块。这真的很奇怪…将
写入主机
替换为
写入输出
突然工作重新启动计算机:DDoS工作。windows或任何其他软件。。。?