Невозможно подключиться к Azure с Mac - PullRequest
0 голосов
/ 05 сентября 2018

Я вижу команду Connect-AzureRmAccount в AzureRM.Profile:

Get-Command -Module AzureRM.Profile* 
CommandType Name                    Version
Cmdlet      Connect-AzureRmAccount  0.13.1

Но когда я его запускаю, получаю следующую ошибку:

Connect-AzureRmAccount : The term 'Connect-AzureRmAccount' 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:1 char:1
+ Connect-AzureRmAccount
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (Connect-AzureRmAccount:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

Я искал stackoverflow, проверил, что у меня последняя версия Powershell, установлен NetCore.Preview. Не могу разобраться в чем дело, может кто-нибудь подсказать?

1 Ответ

0 голосов
/ 05 сентября 2018

См. Эти два открытых вопроса на MS PowerShell GitHub

.

Установка Powershell Core для Mac OSX

https://github.com/PowerShell/PowerShell/issues/7178

Документация: Connect-AzureRmAccount не так?

https://github.com/Azure/azure-docs-powershell/issues/552

Это значит ...

Термин «Connect-AzureRmAccount» не распознается как имя

… Его невозможно найти, поэтому он действует так, будто не загружается автоматически.

Итак, выполните явный импорт модуля.

Get-Module -ListAvailable
Import-Module -Name AzureRM -DisableNameChecking -Force
...