- At E:\WGT\WGT_GetFarmsByServer2.ps1:577 char:108
- + ... ypeInformation -Depth 10).Save("$PSScriptRoot\WGT_FarmsByServer.xml")
- + ~~
- The string is missing the terminator: ".
- At E:\WGT\WGT_GetFarmsByServer2.ps1:281 char:2
- + {
- + ~
- Missing closing '}' in statement block or type definition.
- At E:\WGT\WGT_GetFarmsByServer2.ps1:580 char:1
- +
- The Try statement is missing its Catch or Finally block.
- At E:\WGT\WGT_GetFarmsByServer2.ps1:83 char:16
- + $MainJobScript={
- + ~
- Missing closing '}' in statement block or type definition.
- + CategoryInfo : ParserError: (:) [], ParseException
- + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
After working for some time with certain powershell files, after copying the files to remote machines for execution, sometimes I will get syntax/parsing errors such as below.
I have spent many hours trying to find syntactical errors that do not exist .. opening the file in Notepad++ and changing the encoding to 'Encode in UTF-8-BOM' fixes the issue, but the file originally was set that way.
Product, version and build: PowerShell Studio 2018 v5.5.154
32 or 64 bit version of product: 64
Operating system: Windows 10
32 or 64 bit OS: 64
*** Please add details and screenshots as needed below. ***
DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM