为什么我无法在Powershell ISE中创建此处字符串?



尝试创建此处字符串

> $scriptblock =@'
The string is missing the terminator: '@.
+ CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfString

为什么我在Powershell ISE中得到了这个,但它在Powershell中正常工作?版本5.1。

> $scriptblock =@'
>> 

不,单引号后面没有空格。我刚按了回车键。我甚至关闭和重新开放伊势和同样的事情。

Mathias R.Jessen提供的答案:按[Shift+Enter]在ISE控制台中插入一个文本换行符

最新更新