In order to add extra app setting to web app via powershell is there any way to added app setting without pulling down existed app setting and adding new one then updating back to web app.
I want to simply add new one as we do in portal via powershell.
Is there any other than below
$webapp=Get-AzWebApp -ResourceGroupName $resourceGroupName -Name $appName
$appSettings=$webapp.SiteConfig.AppSettings
$newAppSettings = @{}
ForEach ($item in $appSettings) {
$newAppSettings[$item.Name] = $item.Value
}
$newAppSettings['WEBSITE_RUN_FROM_PACKAGE'] = $urlToAppbinary
Set-AzWebApp -ResourceGroupName $resourceGroupName -Name $appName -AppSettings $newAppSettings