Set-AzureWebsite doesn't update ConnectionStrings
$website = Get-AzureWebsite $websiteName -slot $websiteSlot $connectionStrings = $website.ConnectionStrings
$result = $connectionStrings.Remove(($connectionStrings | Where-Object {$_.Name -eq $connectionStringName}))
Set-AzureWebsite $websiteName -slot $websiteSlot -ConnectionStrings $connectionStrings
Reference: http://stackoverflow.com/questions/29648327/cannot-delete-all-azure-website-connection-strings
I will investigate
Thanks Naveen
From: Rick Raineymailto:[email protected] Sent: 4/15/2015 7:33 PM To: Azure/azure-powershellmailto:[email protected] Subject: [azure-powershell] Set-AzureWebsite doesn't update ConnectionStrings (#340)
$website = Get-AzureWebsite $websiteName -slot $websiteSlot $connectionStrings = $website.ConnectionStrings
$result = $connectionStrings.Remove(($connectionStrings | Where-Object {$_.Name -eq $connectionStringName}))
Set-AzureWebsite $websiteName -slot $websiteSlot -ConnectionStrings $connectionStrings
Reference: http://stackoverflow.com/questions/29648327/cannot-delete-all-azure-website-connection-strings
Reply to this email directly or view it on GitHub: https://github.com/Azure/azure-powershell/issues/340
Any updates on whether this is definitely a bug?
Sorry, I have been OOF and didn't get a chance to debug this.
Thanks Naveen
From: Martin Costellomailto:[email protected] Sent: 4/29/2015 6:28 AM To: Azure/azure-powershellmailto:[email protected] Cc: Naveen Golimailto:[email protected] Subject: Re: [azure-powershell] Set-AzureWebsite doesn't update ConnectionStrings (#340)
Any updates on whether this is definitely a bug?
Reply to this email directly or view it on GitHub: https://github.com/Azure/azure-powershell/issues/340#issuecomment-97426073
Any updates on this?
Any progress on this issue?
Can we please have an update on this?
$connStrings = @{ AzureWebJobsDashboard = @{ Type = "Custom"; Value = $AzureWebJobsDashboard }; AzureWebJobsStorage = @{ Type = "Custom"; Value = $AzureWebJobsStorage }};
Set-AzureRMWebApp -Name $webServiceName -ResourceGroupName $rgName -ConnectionStrings $connStrings
@twitchax: "Azure PowerShell continues to maintain RDFE support on a legacy basis: new functionality and bug fixes are addressed sparingly. This issue does not meet the current threshold for consideration."
Just for the sake of people who reach this thread via Google/Bing .. looks like nallurisrinu's suggestion is working out here...
$connStrings = @{ AzureWebJobsDashboard = @{ Type = "Custom"; Value = $AzureWebJobsDashboard }; AzureWebJobsStorage = @{ Type = "Custom"; Value = $AzureWebJobsStorage }}; Set-AzureRMWebApp -Name $webServiceName -ResourceGroupName $rgName -ConnectionStrings $connStrings
Also for people searching for this error :
Cannot validate argument on parameter 'ConnectionStrings'. Connection string type must be specified.
The Type value in the HashTable must be the string, explicitly, with .ToString().
$connStringsList = $webApp.SiteConfig.ConnectionStrings
$hashItems = New-Object System.Collections.HashTable
ForEach ($keyValuePair in $connStringsList) {
$setting = @{Type=$keyValuePair.Type.ToString();Value=$keyValuePair.ConnectionString.ToString()}
$hashItems.Add($keyValuePair.Name,$setting);
}
Set-AzureRmWebApp -ResourceGroupName $resourceGroupName -Name $appServiceName -ConnectionStrings $hashItems
@umaknow-jeanluc thanks a lot for your brilliant comment, you saved my day \o/