2017-01-10 7 views
1

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 
+0

私はそれを見ましたが、何らかの理由でそれが登録didntのか、私は資産の下で輸入を見ていません。たぶん、私が疲れていない時を見なければならないかもしれません。 – lucuma

答えて

3

あなたはAzureのオートメーションアカウントに適切なモジュールをインポートする必要があります。 Azure Portalを使用してAutomation Module Galleryからモジュールをインポートすることができます。

enter image description here

詳しい情報は、このarticleを参照してください。

linkでモジュールをインポートすることもできます。

enter image description here

あなたはポータルで2つのコマンドレットを見つけることができる、一瞬のを待ちます。

enter image description here

+0

'自動化アカウント' - > '共有リソース' - > 'モジュール' –

+0

ありがとう、ボタンクリックで実現できたことを知らなかった。私は紺碧のチームがとても速く動いているという事実を愛していますが、インターネット上で見つけられた文書を古いものにすることがあります。 – lucuma

関連する問題