【问题标题】:Cannot execute Connet-AzureAD with installed AzureAD Module无法通过安装 AzureAD 模块执行 Connect-AzureAD
【发布时间】:2021-09-25 01:44:23
【问题描述】:

我在 Powershell 版本 7 中安装了 AzureAD 模块,但是我无法执行 Connect-AzureAD Cmdlet。

有什么想法吗?

PS C:\Users\User> Get-InstalledModule

Version              Name                                Repository           Description
-------              ----                                ----------           -----------
2.0.2.135            AzureAD                             PSGallery            Azure Active Directory V2 Gene…

PS C:\Users\User> Connect-AzureAD
Connect-AzureAD: The term 'Connect-AzureAD' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

【问题讨论】:

标签: azure powershell azure-powershell


【解决方案1】:

(旧版)“AzureAD”、“AzureADPreview”和“MSOnline”PowerShell 模块仅适用于 Windows PowerShell(即 Windows PowerShell 5.1 或更早版本

如果您想使用跨平台的 PowerShell 版本(例如 PowerShell 7+),那么您需要使用现代 Microsoft Graph 模块,例如:

【讨论】:

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