'Windows PowerShell show me this error : The string is missing the terminator: ' [closed]
Salam, I formatted my computer a few days ago, And i get this error, which I have not seen before. I search on net but I don't find any useful solution. Hope that you can help me guys !
error :
The string is missing the terminator: '. + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
I think that the second error come from the first one
[![enter image description here][1]][1]
PowerShell version => 5.1.19041.1320
Solution 1:[1]
PowerShell example Command:
unzipRelease –Src '$ReleaseFile' -Dst '$Destination'
Here the File Path is set in variable or writing directly in the command should include the quotes like above.
If you have any path which includes backslashes like:
"C:\users\delsg\"
When writing above path in PowerShell commands, rewrite it like:
"C:\\users\\delsg\\"
Few other examples were:
It works with single quotes. Command (or PowerShell) will take off the double quotes unless they're back slashed. Or put it in a script. Or pass the argument list as an array.
powershell Start-Process -Verb runas cmd '/k dir c:\'
powershell Start-Process -Verb runas cmd \"/k dir c:\\\"
powershell Start-Process -Verb runas cmd /k,dir,c:\
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | DelliganeshS-MT |
