J'essaie d'étendre un plan de service en utilisant Set-AzureRmAppServicePlan
. Je me connecte bien, je peux lister toutes les ressources du compte mais quand j'appelle la méthode du plan d'application, elle n'est pas trouvée. Qu'est-ce qui manque ici?Azure Automation: le terme "Set-AzureRmAppServicePlan" n'est pas reconnu
code:
$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"
Erreur:
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
j'ai vu cela, mais pour une raison quelconque, il na pas s'inscrire ou je ne voyais pas l'importation à l'actif. Peut-être besoin de regarder quand je ne suis pas si fatigué. – lucuma