
With our fileshare in place we will now create a SAS to connect to our fileshare.
#lets create a start and end date
$startDate = Get-Date
$expDate
= $startDate.AddMonths(1)
Create the SAS storage token.
#Create a sas token for the fileshare
$fileShareSASToken = New-AzStorageShareSASToken
-ShareName $fileShareName
-Context $storageaccountctx
-Permission 'rwdl'
-StartTime $startDate
-ExpiryTime $expDate
-FullUri
Get the varible and save the Storage URI and your new SAS token. Learn more about it here.

If you don’t have AZcopy installed browse and download it https://aka.ms/downloadazcopy and install.

In Visual Studio Code select to open a new terminal.

Go into the folder for AZcopy and start the copy by specifying the azure share and the SAS token.

WOW! You just copied a file to your very own Azure storage account!