To specify site settings using Azure PowerShell, use the Set-AzureWebsite cmdlet.
For example,this code demonstrates enabling web sockets for a site.
$wsName = "contoso-web"
Set-AzureWebsite $wsName -WebSocketsEnabled $true
To define application settings using PowerShell, you will need to create a hashtable to define the setting. This is an example showing how to define a key/value pair for application settings.
$settings = New-Object Hashtable
$settings["Contoso_HR_WebService_URL"] = "https://contoso-webservices/hr"
Set-AzureWebsite $wsName -AppSettings $settings
This is an example of how to define a connection string using Azure PowerShell where a Connection String Info structure is used to deine the connection string.
$connStrs = (@{Name="contosodb"; Type="SQLAzure"; ConnectionString="Server=tcp:.." })
Set-AzureWebsite -Name $wsName -ConnectionStrings $connStrs
For example,this code demonstrates enabling web sockets for a site.
$wsName = "contoso-web"
Set-AzureWebsite $wsName -WebSocketsEnabled $true
To define application settings using PowerShell, you will need to create a hashtable to define the setting. This is an example showing how to define a key/value pair for application settings.
$settings = New-Object Hashtable
$settings["Contoso_HR_WebService_URL"] = "https://contoso-webservices/hr"
Set-AzureWebsite $wsName -AppSettings $settings
This is an example of how to define a connection string using Azure PowerShell where a Connection String Info structure is used to deine the connection string.
$connStrs = (@{Name="contosodb"; Type="SQLAzure"; ConnectionString="Server=tcp:.." })
Set-AzureWebsite -Name $wsName -ConnectionStrings $connStrs