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或任何其他软件。。。?