title: PowerShell script error: the string is missing the terminator:
body: <p>Incredibly simple powershell script...</p>
  
  <pre><code>#Server side storage copy
  
  $SourceStorageAccount = "myStorageAccount"
  $SourceStorageKey = "myKey"
  
  $SourceStorageContext = New-AzureStorageContext –StorageAccountName $SourceStorageAccount -StorageAccountKey $SourceStorageKey
  </code></pre>
  
  <p>fails with the error </p>
  
  <blockquote>
    <p>At E:\DeploymentScripts\Storage\Test.ps1:6 char:51
    + ... geContext â€“StorageAccountName $SourceStorageAccount -StorageAccount ...
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The string
    is missing the terminator: ".
        + CategoryInfo          : ParserError: (:) [], ParseException
        + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString</p>
  </blockquote>
  
  <p>The strangest part is if I copy and paste the contents of the ps1 file into a PowerShell command line, it works fine !?  What's going on?</p>
  
  <p>Obviously I have removed my storage container name and key, you will need to assign your own Azure storage account name and api key to replicate it.</p>
  
  <p>EDIT: A screen shot of the script edited in Notepad++ with all characters visible...</p>
  
  <p><a href="https://i.stack.imgur.com/4eKyD.png" rel="noreferrer"><img src="https://i.stack.imgur.com/4eKyD.png" alt="A screen shot of the script edited in Notepad++ with all characters visible"></a></p>