Post

AutoMount Azure Storage Account in Windows VM

image

To let the FileShare connection script be autorun at the start of the virtual machine instance and the fileshare be mounted using the same drive letter in VMSS where Talend is deployed

  1. Create the file named script.ps1 in the following folder location
1
C:\Users\<USER>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
  1. With its content as the connection script provided by azure for mounting FileShare, go to the Azure file storage account

image

image

  1. In the Same folder create a file startup.bat with the following code
1
2
3
@ECHO OFF
Powershell.exe -executionpolicy bypass -File  .\script.ps1

And Done ! on every VM or Windows Machine Restart your Storage Account will be Mounted as Z: drive in your OS as the Shell Script will be Auto Executed in Windows

This post is licensed under CC BY 4.0 by the author.