如何使用PowerShell为插槽设置虚拟目录 [英] How to set a virtual directory for a slot using PowerShell
问题描述
除了插槽之外,我正在尝试执行相同的操作.您知道如何解决吗?
您好,萨纳,
如果您导航到资源浏览器(resources.azure.com)并向下导航到您的Web应用->广告位->配置->在Web上,如果您单击右侧的PowerShell选项卡,则会看到有关如何更新该节点的示例.这是一个例子 我从示例Web应用程序退出.在属性对象中,您将具有要更改的虚拟目录配置.
#PowerShell等效脚本
#GET网站
Get-AzureRmResource -ResourceGroupName jebrook-ResourceGroup -ResourceType Microsoft.Web/sites/slots/config -ResourceName"jebrook-webapp/test/web"; -ApiVersion 2018-02-01
#SET网站
PropertiesObject = @ {#Property =值;
}
Set-AzureRmResource -PropertyObject
PropertiesObject -ResourceGroupName jebrook-ResourceGroup -ResourceType Microsoft.Web/sites/slots /config -ResourceName" jebrook-webapp/test /web " -ApiVersion 2018-02-01 -Force
I am trying to do the same but for a slot. Any idea how to go about this?
Hi Sana,
If you navigate to resource explorer (resources.azure.com) and navigate down to your web app - > slot - > config - > web you'll see if you click on the PowerShell tab on the right side an example on how to update that node. Here is an example that I pulled from my example web app. In the properties object you would have the the virtual directory configuration you would like to change.
# PowerShell equivalent script
# GET web
Get-AzureRmResource -ResourceGroupName jebrook-ResourceGroup -ResourceType Microsoft.Web/sites/slots/config -ResourceName "jebrook-webapp/test/web" -ApiVersion 2018-02-01
# SET web
PropertiesObject = @{#Property = value;
}
Set-AzureRmResource -PropertyObject
PropertiesObject -ResourceGroupName jebrook-ResourceGroup -ResourceType Microsoft.Web/sites/slots/config -ResourceName "jebrook-webapp/test/web" -ApiVersion 2018-02-01 -Force
这篇关于如何使用PowerShell为插槽设置虚拟目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!