Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
自动删除Azure转移服务_Azure_Azure Cloud Services - Fatal编程技术网

自动删除Azure转移服务

自动删除Azure转移服务,azure,azure-cloud-services,Azure,Azure Cloud Services,我想使用Azure Automation删除我的云服务中的所有临时部署。我希望每天运行一次Powershell脚本来执行此操作 有没有预定义的脚本可以这样做?有任何示例吗?以下Powershell cmdlet可用于删除网站上的部署插槽。您可以循环浏览部署插槽列表,也可以逐个执行 Remove-AzureWebsite -Name webappslotstest -Slot staging 有三种方法可以做到这一点 在虚拟机或客户端计算机上运行此操作 在webapp中将此作为Webjob作为

我想使用Azure Automation删除我的云服务中的所有临时部署。我希望每天运行一次Powershell脚本来执行此操作


有没有预定义的脚本可以这样做?有任何示例吗?

以下Powershell cmdlet可用于删除网站上的部署插槽。您可以循环浏览部署插槽列表,也可以逐个执行

Remove-AzureWebsite -Name webappslotstest -Slot staging
有三种方法可以做到这一点

  • 在虚拟机或客户端计算机上运行此操作
  • 在webapp中将此作为Webjob作为powershell脚本运行(我将使用此脚本)
  • Azure自动化,正如您所要求的。您可以为此使用Runbook,您可以找到有关Runbook和示例脚本的更多信息

希望这有帮助

我的回答有帮助吗,还是你仍然有这个问题?