问题描述
是否有可能在Azure的云服务Azure的使用PowerShell的?
Is it possible to update the value of a setting in an Azure Cloud Service with Azure Powershell?
推荐答案
目前为止,还没有办法更新只是一个单一的设置(服务管理API不允许它 - 它仅接受了整个服务配置)。因此,为了更新单个设置,你将不得不更新整个配置。你还可以使用PowerShell做到这一点:
So far there is no way to update just a single setting (the Service Management API does not allow it - it only accepts the whole service configuration). So, in order to update a single setting, you will have to update the entire configuration. And you can do this with PowerShell:
# Add the Azure Account first - this will create a login promppt
Add-AzureAccount
# when you have more then one subscription - you have explicitly select the one
# which holds your cloud service you want to update
Select-AzureSubscription "<Subscription name with spaces goes here>"
# then Update the configuration for the cloud service
Set-AzureDeployment -Config -ServiceName "<cloud_service_name_goes_here>" `
-Configuration "D:/tmp/cloud/ServiceConfiguration.Cloud.cscfg" `
-Slot "Production"
有关的了`构型的参数我已经提供了完整的本地路径为新的配置文件,我想用我的云服务的使用。
For the the `-Configuration' parameter I have provided full local path to the new config file I want to use with my cloud service.
这是验证和工作方案。
这篇关于如何更新使用Azure的PowerShell中的Azure云服务设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!