While executing Get-CrmRecordsByFetch operation in PowerShell using Microsoft.Xrm.Data.PowerShell library, I encountered
White space is not allowed before the string terminator.PowerShell error.
The Get-CrmRecordsByFetch cmdlet is used to retrieve CRM records from Dynamics 365/CRM using FetchXML. The FetchXML query used should be provided as a string, and the returned results are a collection of entity objects.
White space is not allowed before the string terminator when using this cmdlet. The string terminator is used to tell the cmdlet that the FetchXML query has been provided and it should start the retrieval process. If there is white space before the string terminator, it will be treated as part of the FetchXML query and the retrieval process will fail.
More results from stackoverflow.com
Aug 4, 2011 — Each time I enter it, I get this #*#*# error ! PS C:\Windows\SysWOW64\WindowsPowerShell\v1.0> $chunk=@” The string is missing the terminator: “.
19 hours ago — White space is not allowed before the string terminator.PowerShell error. Reason: Issue was with the format of 'FetchXML' being passed to Get- ...
Jul 25, 2017 — This breaks there here-string as white space is not allowed before the string terminator (which the syntax highlighter correctly points out) ...