赞
踩
这里是选取的Analysis Services 资源
编辑脚本后保存,发布
也可以在测试窗格进行测试,该测试会直接执行runbook,如果脚本里有变更资源的还请慎重
$resourceGroup = "xxxx" $resourceName = "xxxx" $USIClientID = "xxxx" #USIClientID 为用户托管标识的客户端 ID # Ensures you do not inherit an AzContext in your runbook Disable-AzContextAutosave -Scope Process # Connect to Azure with user-assigned managed identity $AzureContext = (Connect-AzAccount -Identity -AccountId $USIClientID -Environment AzureChinaCloud).context # set and store context $AzureContext = Set-AzContext -SubscriptionName $AzureContext.Subscription -DefaultProfile $AzureContext # 需要执行的操作 Get-AzAnalysisServicesServer -ResourceGroupName $resourceGroup -Name $resourceName
定期执行runbook
如下:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。