Forum Discussion
Get-AzureStorageFileContent not working in script
- May 13, 2022
My uneducated guess is the script file is saved in a Unicode format that presents issues when called from your PowerShell session, which I'm further guessing is running under a different culture.
Because I'm a Skippy - sorry, Australian - I'm not terribly familiar with other culture settings but something you could try is re-saving the .ps1 script in Notepad as either ASCII or UTF-8 and then running that. It might also pay to delete the existing hyphens first and re-typing them while in Notepad before re-saving the script (but again, this is also just another guess - cultures really aren't my strength.)
It's a long shot and I'm 100% guessing, but the fact that both hyphens in front of each parameter within the red error message have translated to a different Unicode character is what has me guessing in this direction.
Cheers,
Lain
My uneducated guess is the script file is saved in a Unicode format that presents issues when called from your PowerShell session, which I'm further guessing is running under a different culture.
Because I'm a Skippy - sorry, Australian - I'm not terribly familiar with other culture settings but something you could try is re-saving the .ps1 script in Notepad as either ASCII or UTF-8 and then running that. It might also pay to delete the existing hyphens first and re-typing them while in Notepad before re-saving the script (but again, this is also just another guess - cultures really aren't my strength.)
It's a long shot and I'm 100% guessing, but the fact that both hyphens in front of each parameter within the red error message have translated to a different Unicode character is what has me guessing in this direction.
Cheers,
Lain
Thanks, when i save in Notepadd using UTF-8 BOM working fine 🙂