Azureにログインするための比較的簡単なスクリプトを実行しています(対話型のウィンドウが表示されます)、名前が利用可能かどうかを調べるときにログイン作品、当初Powershellを使ってAzureにログインするようにプロンプトが表示されます
# Install the Azure Resource Manager modules from PowerShell Gallery
# Takes a while to install 28 modules
Install-Module AzureRM -Force -Verbose
Install-AzureRM
# Install the Azure Service Management module from PowerShell Gallery
Install-Module Azure -Force -Verbose
# Import AzureRM modules for the given version manifest in the AzureRM module
Import-AzureRM -Verbose
# Import Azure Service Management module
Import-Module Azure -Verbose
# Authenticate to your Azure account
Login-AzureRmAccount -SubscriptionId 'xxxxxxxx'
# Adjust the 'yournamehere' part of these three strings to
# something unique for you. Leave the last two characters in each.
$URI = 'https://someurlhere.com/azuredeploy.json'
$Location = 'east us'
$rgname = 'yournamehererg'
$saname = 'yournameheresa' # Lowercase required
$addnsName = 'yournameheread' # Lowercase required
# Check that the public dns $addnsName is available
if (Test-AzureRmDnsAvailability -DomainNameLabel $addnsName -Location $Location)
{ 'Available' } else { 'Taken. addnsName must be globally unique.' }
、私のサブスクリプションに現れ、私は最後のコマンドを実行したときに...私が取得:再度ログインするように要求
Test-AzureRmDnsAvailability : Run Login-AzureRmAccount to login.
私は何かを得ることができませんこの時点までに実行する本当にイライラしています。助けをよろしく!
コマンドを個別に実行する場合、これはPowerShellで機能しますか?使用しているAzureRMのバージョンを確認できますか? – CtrlDot
新しいAzure CLI 2.0ではサポートされていない機能はありますか? https://docs.microsoft.com/en-us/cli/azure/install-azure-cli - 私はこれをOS X、Powershell、そしてDockerコンテナで成功しています。 – Digicoder