PowerShell脚本出现错误:
At line:365 char:17
+ $HTMLerror += $usererror
+ ~~~~~~~~~~~~~~~~~~~~~~~~
Executable script code found in signature block.
At line:367 char:17
+ $ErrorMessage
+ ~~~~~~~~~~~~~
Executable script code found in signature block.
At line:371 char:1
+ $content = "
+ ~~~~~~~~~~~~
Executable script code found in signature block.
At line:390 char:1
+ $table += $content
+ ~~~~~~~~~~~~~~~~~~
Executable script code found in signature block.
At line:394 char:5
+ $HTMLerror | Add-Content C:\test.html
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Executable script code found in signature block.
At line:396 char:5
+ $table | Add-Content C:\test.html
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Executable script code found in signature block.
At line:398 char:5
+ $endtable = "</table>"
+ ~~~~~~~~~~~~~~~~~~~~~~
Executable script code found in signature block.
At line:400 char:5
+ $endtable | Add-Content C:\test.html
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Executable script code found in signature block.
进行一些研究后,似乎是PowerShell中的一个错误。前364行代码可以正常工作,但是由于某种原因,此错误始于365行。有人发现过该错误的解决方法吗?
任何帮助或提示将不胜感激! -leah_cyberpadawan
P.S。它以VS代码PSVersion 4.0运行。