【问题标题】:New-AzureADPolicy missed in the Azure cloud shellAzure 云外壳中缺少 New-AzureADPolicy
【发布时间】:2019-08-09 09:27:23
【问题描述】:

Azure 云外壳中缺少 New-AzureADPolicy

New-AzureADPolicy : The term 'New-AzureADPolicy' 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.

如果尝试安装 AzureADPreview

Install-Module -Name AzureADPreview

结果是:

PackageManagement\Install-Package : Unable to load shared library 'api-ms-win-core-sysinfo-l1-1-0.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libapi-ms-win-core-sysinfo-l1-1-0.dll: cannot open shared object file: No such file or directory

是否可以在 Web 云 shell 中以某种方式使用 Azure AD?

【问题讨论】:

  • 云shell不支持安装模块,本地安装即可。
  • 但也许一个月前它是可用的命令并且我使用声明映射策略,我在本地也有同样的错误
  • 你的意思是Install-Module -Name AzureADPreview 一个月前在cloud shell 中工作? AFAIK,云外壳从不支持安装模块。
  • 我的意思是 New-AzureADPolicy 之前可用
  • 如果 Install-Module -Name AzureADPreview local 在 windows 10 上出现同样的错误

标签: azure azure-active-directory azure-powershell azure-cloud-shell


【解决方案1】:

AzureAD 模块包含在 Azure 云外壳中,但New-AzureADPolicy 现在只存在AzureADPreview 模块中,我们无法在 Azure 云外壳中安装此模块。所以我们不能在 Azure 云 shell 中运行New-AzureADPolicy

但是我们可以在Azure云shell中运行大部分AzureAD命令列表here,不需要安装AzureAD模块。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多