Incredibly simple powershell script ...
#Server side storage copy $SourceStorageAccount = "myStorageAccount" $SourceStorageKey = "myKey" $SourceStorageContext = New-AzureStorageContext –StorageAccountName $SourceStorageAccount -StorageAccountKey $SourceStorageKey
with an error
In E: \ DeploymentScripts \ Storage \ Test.ps1: 6 char: 51 + ... geContext - StorageAccountName $ SourceStorageAccount -StorageAccount ... + ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Line missing terminator: ". + CategoryInfo: ParserError: ( :) [], ParseException + FullyQualifiedErrorId: TerminatorExpectedAtEndOfString
The weirdest part is if I copy and paste the contents of the ps1 file into the PowerShell command line, it works fine !? What's happening?
Obviously, I deleted the name and key of the storage container, you will need to assign your own name to the Azure storage account and the api key to replicate it.
EDIT: Screenshot of a script edited in Notepad ++ with all visible characters ...

source share