在Powershell.exe中运行CTRL + C Powershell脚本时出错

时间:2017-01-13 12:40:29

标签: powershell

我想在Powershell.exe中运行Powershell代码。

当我输入

Copy-Item c:\test\my_file.txt C:\Test\testPSHELL

它工作正常。

当我复制它然后粘贴它时,我得到了

^V

这是正常的。但在获胜后我得到了错误:

The term '▬' is not recognized as the name of a cmdlet, function, script   file,
or operable program. Check the spelling of the name, or if a path was      included, 
verify that the path is correct and try again.
At line:1 char:1

难道你不知道问题出在哪里?我很沮丧:D

1 个答案:

答案 0 :(得分:0)

您遇到该错误的原因是Ctrl-C是PowerShell的中断命令。如果你有一个长时间运行的命令要在它完成之前中断,按Ctrl-C将终止命令(这对于Linux shell,如bash,zsh等也是如此)。