Я пытаюсь расширить план обслуживания с помощью Set-AzureRmAppServicePlan
. Я хорошо подключаюсь, могу перечислять все ресурсы в учетной записи, но при вызове метода плана приложения он не найден. Что здесь упущено?Azure Automation: термин «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
Я видел это, но по какой-то причине оно не зарегистрировать или я не видел импорт под активы. Может быть, нужно смотреть, когда я не так устал. – lucuma