How to express Azure File Share location using Powershell

Justin Doh 860 Reputation points
2023-12-18T19:31:11.8466667+00:00

I am trying to modify existing Powershell script which uses local drive (C:\ drive) and it is working

Now, I am trying to modify this Powershell code to point to Azure File Share location instead.

param ( [String] $Filename  = '*.csv',
        [String] $SourceDir = 'C:\Test\',
        [String] $TargetDir = 'C:\Test\convert\'
)

ForEach ($csvFile in Get-ChildItem -Path $SourceDir -Filter $Filename){
    (Import-Csv $csvFile | 
     ConvertTo-Csv -NoTypeInformation -Delimiter '|') -replace '[,"]' -replace '\|',',' |
         Set-Content (Join-Path $TargetDir $csvFile.Name)                  
}

Where is a good source to get the sample of Powershell code that illustrates account URL, Key, share folder name & directory path ?

I have created a question to Stackoverflow, but I did not get the good answers yet.

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
Windows for business | Windows Server | User experience | PowerShell
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.