Azure 自动化:无法识别术语 'Set-AzureRmAppServicePlan'

Azure Automation: The term 'Set-AzureRmAppServicePlan' is not recognized

我正在尝试使用 Set-AzureRmAppServicePlan 扩展服务计划。我连接正常,可以列出帐户中的所有资源,但是在调用应用程序计划方法时找不到。这里遗漏了什么?

代码:

$connectionName = "AzureRunAsConnection"
try
{
    # Get the connection "AzureRunAsConnection "
    $servicePrincipalConnection=Get-AutomationConnection -Name $connectionName         

    "Logging in to Azure..."
    Add-AzureRmAccount `
        -ServicePrincipal `
        -TenantId $servicePrincipalConnection.TenantId `
        -ApplicationId $servicePrincipalConnection.ApplicationId `
        -CertificateThumbprint $servicePrincipalConnection.CertificateThumbprint 
}
catch {
    if (!$servicePrincipalConnection)
    {
        $ErrorMessage = "Connection $connectionName not found."
        throw $ErrorMessage
    } else{
        Write-Error -Message $_.Exception
        throw $_.Exception
    }
}

Select-AzureRmSubscription -SubscriptionId "MYSUB"

Set-AzureRmAppServicePlan -Name "my-plan" -ResourceGroupName "my-group" -Tier "Standard" -WorkerSize "Small"

错误:

Set-AzureRmAppServicePlan : The term 'Set-AzureRmAppServicePlan' is not recognized as the name of a cmdlet, function, 
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is 
correct and try again.
At line:35 char:1
+ Set-AzureRmAppServicePlan -Name "JJJLK" -ResourceGroupN ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Set-AzureRmAppServicePlan:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

您需要将适当的模块导入您的 Azure 自动化帐户。您可以使用 Azure 门户从自动化模块库导入模块。

更多信息请参考此

您也可以通过 link.

导入模块

稍等一下,您可以在 Portal 中找到这两个 cmdlet。