【发布时间】:2015-07-15 14:46:52
【问题描述】:
加载 PowerShell 控制台时出现以下错误:
The string is missing the terminator: '.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
所有配置文件位置都通过 TestPath $PROFILE 报告错误,以及 Powershell ISE 配置文件文件的位置。
PS C:\Windows\System32> Test-path $profile.AllUsersAllHosts
False
PS C:\Windows\System32> Test-path $profile.AllUsersCurrentHost
False
PS C:\Windows\System32> Test-path $profile.CurrentUserAllHosts
False
PS C:\Windows\System32> Test-path $profile.CurrentUserCurrentHost
False
PS C:\Windows\System32> Test-path "C:\Users\bleykekhman\Documents\WindowsPowerShell\Microsoft.PowerShelllSE_profile.psl"
False
PS C:\Windows\System32> Test-Path $PSHOME\Microsoft.PowerShelllSE_profile.ps1
False
如果我根本没有任何配置文件脚本,我的问题是什么导致了错误消息?
【问题讨论】:
-
出于好奇,为什么要关闭?
-
这当然很奇怪。在黑暗中拍摄,但您的 PowerShell 快捷方式的目标是什么样的。和你上一个问题一样吗?这是 x64 还是 x86 控制台?我想知道你是否在这里有个人资料?
C:\Windows\SysWOW64\WindowsPowerShell\v1.0 -
FWIW 我认为您的问题很清楚。你可以用实际的文本替换图像吗?
-
在命令提示符下运行
powershell.exe时是否遇到同样的错误? -
@Matt - 你就在现场。快捷方式是
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -PSConsoleFile "D:\Program Files (x86)\Microsoft Team Foundation Server 2013 Power Tools\tfshell.psc1" -noexit -command ". 'D:\Program Files (x86)\Microsoft Team Foundation Server 2013 Power Tools\TFSS,它显然是拙劣的。我将其更改为%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe,它工作正常。请安排您的评论作为回复,我将给予充分的信任。
标签: powershell