I am trying to read data from the files (json files) that exists in my Azure Storage's FileShare. I don't want to download the file and instead just read and get the data. The following command downloads the file for me instead of reading and storing the data in a variable. Please help.
$fileContents = Get-AzStorageFileContent -ShareName $fileShareName -Path $filePath -Context (Get-AzStorageAccount -ResourceGroupName $ResourceGroupName -Name "name").Context -OutVariable fileContents
How can I read the data and potentially post files in the filshare as well? I have been following this documentation but could not find a solution.
I tried in my environment and got below results:
Initially I tried with below commands to read the file from azure-file share with downloading it worked.
Commands:
Console:
As workaround, if you need to read the files in azure file share without downloading you can use below python code.
Code:
Console: