PowerShell script error: the string is missing the terminator:

房东的猫 提交于 2019-12-01 08:23:11
Shui shengbao

It's similar with this question.

When you copy cmdlets from Web, maybe there are some special characters. I suggest you could copy the cmdlets to Notepad then copy to PowerShell.

It's helpful to use cat filename.ps1 in the terminal you can see determine which characters are bad, it's not obvious in the editor.

So parts of the code are copied and pasted from websites which have non-standard dash characters. I found it easier to see the characters when you use the cat command from the powershell command line to list the file

Here's a screenshot of what it looks like listed in the powershell:-

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!