PowerShell Script to download a file from Azure Storage Share with Thumbprint certificate-based Authentication.
Prior to running the script please ensure to set the following variables accordingly in File.
Connection details
- TenantID = Find your azure Tenant ID
- AppID = Find your Azure App ID
- thumbprint = Generate your App Thumbprint certificate
Predefined variables
- StorageAccountName = Your Storage Account's name where the file is stored.
- ResourceGroupName = Your Resource Group name.
- DestinationPath = Local path to save file on host.
- DownloadFilePath = File path to download.
- StorageAccountKey = Find your Storage Account key
# Download project
git clone https://github.com/umer-r/azure-filedownload-automation.git
cd azure-filedownload-automation
# Unblock and set execution policy bypass
Unblock-File -Path .\AzCertConnectDownload.ps1; PowerShell -ExecutionPolicy Bypass -File ".\AzCertConnectDownload.ps1"
# Run File
.\AzCertConnectDownload.ps1