Send/Upload blob to a StorageAccount container.
The only service which is mandatory is Azure Storage Account, on which bacpac files will be uploaded to.
Since PowerShell Gallery is involved, you need to have PowerShellGet installed. Instructions how to install PowerShellGet (https://docs.microsoft.com/en-us/powershell/scripting/gallery/installing-psget?view=powershell-7.1).
A blob container with the name that you specified in the StorageAccount where the blob will be stored.
Account/Service Prinicipal under which script will work should have proper permission (Contributor) assigned to storage account.
- First open up PowerShell prompt as an administrator.
- Start type
Set-ExecutionPolicy -Scope CurrentUser Unrestricted
This is to remove warnings if your environment does not trust these scripts.
3. Then install the EpinovaAzureToolBucket.
Install-Module EpinovaAzureToolBucket -Scope CurrentUser -Force
- Add the code below and make the changes needed to fit your context.
$SubscriptionId = "e8xxx180-9xxf-4xx4-axx7-3xxxffxx7fxx"
$ResourceGroupName = "rg-ove-1231hjkjia-dev"
$StorageAccountName = "stove1231hjkjiadev"
$StorageAccountContainer = "db-backups"
$FilePath = "C:\dev\temp\_blobDownloads\epicms_Integration_20221027082506.bacpac"
Send-Blob -SubscriptionId $SubscriptionId -ResourceGroupName $ResourceGroupName -StorageAccountName $StorageAccountName -StorageAccountContainer $StorageAccountContainer -FilePath $FilePath