@@ -94,7 +94,11 @@ function Get-SitecoreAzureStorageAccount
9494 [Parameter (Position = 2 , Mandatory = $false )]
9595 [ValidateNotNullOrEmpty ()]
9696 [System.String ]
97- $ContainerName = " databases"
97+ $ContainerName = " databases" ,
98+ [Parameter (Position = 3 , Mandatory = $false )]
99+ [ValidateNotNullOrEmpty ()]
100+ [System.String ]
101+ $StorageAccountType
98102 )
99103
100104 $ContainerName = $ContainerName.ToLowerInvariant ()
@@ -109,7 +113,7 @@ function Get-SitecoreAzureStorageAccount
109113 $storageAccount = New-AzureRmStorageAccount - ResourceGroupName $ResourceGroup.ResourceGroupName `
110114 - Location $ResourceGroup.Location `
111115 - Name $AccountName `
112- - Type Standard_LRS
116+ - Type $StorageAccountType
113117 }
114118
115119 $storageAccountKey = Get-AzureRmStorageAccountKey - ResourceGroupName $ResourceGroup.ResourceGroupName `
@@ -482,6 +486,14 @@ function Get-SitecoreAzureSqlDatabaseConnectionString
482486 . PARAMETER AzureStorageAccountName
483487 Specifies the name of the new Storage Account. The storage name must be globally unique.
484488
489+ . PARAMETER AzureStorageAccountType
490+ Specifies the type of the new Storage Account. Valid values are:
491+ -- Premium_LRS (Locally-redundant storage based on Solid State Drive (SSD))
492+ -- Standard_LRS (Locally-redundant storage)
493+ -- Standard_ZRS (Zone-redundant storage)
494+ -- Standard_GRS (Geo-redundant storage)
495+ -- Standard_RAGRS (Read access geo-redundant storage)
496+
485497 . PARAMETER AzureSqlServerName
486498 Specifies the name of the new SQL Database server. The server name must be globally unique.
487499
@@ -532,7 +544,7 @@ function Get-SitecoreAzureSqlDatabaseConnectionString
532544 ID=sitecore@sitecore-azure-50876f04;Password=Experienc3!;Trusted_Connection=False;Encrypt=True;Connection Timeout=30
533545
534546 . EXAMPLE
535- PS C:\> Publish-SitecoreSqlDatabase -SqlServerName "Oleg-PC\SQLEXPRESS" -SqlServerCredentials $credentials -SqlServerDatabaseList @("sc81initial_core", "sc81initial_web") -AzureStorageAccountName "mycompanyname"
547+ PS C:\> Publish-SitecoreSqlDatabase -SqlServerName "Oleg-PC\SQLEXPRESS" -SqlServerCredentials $credentials -SqlServerDatabaseList @("sc81initial_core", "sc81initial_web") -AzureStorageAccountName "mycompanyname" -AzureStorageAccountType Standard_GRS
536548
537549 This command publishes the SQL Server databases "sc81initial_core" and "sc81initial_web" from the local SQL Server "Oleg-PC\SQLEXPRESS" to an Azure SQL Database Server using the Azure Storage Account "mycompanyname" for BACPAC packages (.bacpac files).
538550
@@ -623,16 +635,22 @@ function Publish-SitecoreSqlDatabase
623635 $AzureStorageAccountName = " sitecoreazure{0}" -f (Get-AzureRmContext ).Subscription.SubscriptionId.Substring(0 , 8 ),
624636
625637 [Parameter (Position = 6 , Mandatory = $false )]
638+ [ValidateNotNullOrEmpty ()]
639+ [ValidateSet (" Premium_LRS" , " Standard_LRS" , " Standard_ZRS" , " Standard_GRS" , " Standard_RAGRS" )]
640+ [System.String ]
641+ $AzureStorageAccountType = " Standard_LRS" ,
642+
643+ [Parameter (Position = 7 , Mandatory = $false )]
626644 [ValidateNotNullOrEmpty ()]
627645 [System.String ]
628646 $AzureSqlServerName = " sitecore-azure-{0}" -f (Get-AzureRmContext ).Subscription.SubscriptionId.Substring(0 , 8 ),
629647
630- [Parameter (Position = 7 , Mandatory = $false )]
648+ [Parameter (Position = 8 , Mandatory = $false )]
631649 [ValidateNotNull ()]
632650 [System.Management.Automation.PSCredential ]
633651 $AzureSqlServerCredentials = (New-Object System.Management.Automation.PSCredential (" sitecore" , (ConvertTo-SecureString " Experienc3!" - AsPlainText - Force))),
634652
635- [Parameter (Position = 8 , Mandatory = $false )]
653+ [Parameter (Position = 9 , Mandatory = $false )]
636654 [ValidateNotNullOrEmpty ()]
637655 [System.String ]
638656 $AzureSqlDatabasePricingTier = " S2"
@@ -646,7 +664,8 @@ function Publish-SitecoreSqlDatabase
646664 - Location $AzureResourceGroupLocation
647665
648666 $storageAccountContext = Get-SitecoreAzureStorageAccount - ResourceGroup $resourceGroup `
649- - AccountName $AzureStorageAccountName
667+ - AccountName $AzureStorageAccountName `
668+ - StorageAccountType $AzureStorageAccountType
650669
651670 Set-SitecoreAzureBacpacFile - Directory $outputDirectory `
652671 - StorageAccountContext $storageAccountContext
0 commit comments