当前位置:网站首页 > 更多 > 玩电脑 > 正文

[玩转系统] 术语“Connect-MgGraph”未被识别

作者:精品下载站 日期:2024-12-14 13:37:25 浏览:15 分类:玩电脑

术语“Connect-MgGraph”未被识别


[玩转系统] 术语“Connect-MgGraph”未被识别

尝试使用 PowerShell 连接到 Exchange Online 时,您可能会收到以下错误消息:

PS C:\> Connect-MgGraph
Connect-MgGraph : The term 'Connect-MgGraph' 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.

此错误消息表明您尚未安装 Microsoft Graph PowerShell 模块。

该模块可以在此处找到,您可以通过运行以下命令来安装它:

Import-Module Microsoft.Graph

请注意,Microsoft Graph PowerShell 模块的规模非常巨大。该软件包超过半GB,下载和安装需要相当长的时间。

您可以通过查找前缀为“Microsoft.Graph”的文件夹来验证安装。

如果您使用管理员权限安装 Microsoft Graph PowerShell 模块,这些文件夹将下载到%program files%\WindowsPowerShell\Modules

如果您在没有管理员权限的情况下安装模块,则会在 %userprofile%\Documents\WindowsPowerShell\Modules 中创建文件夹。

(阅读本文以了解有关 PowerShell 模块并行安装的更多详细信息)

下载 Microsoft Graph PowerShell 模块后,您将能够成功连接:

PS C:\> Connect-MgGraph
Welcome To Microsoft Graph!

Microsoft Graph 和 Active Directory 的集成

Easy365Manager 是一种管理工具,可在 Active Directory 用户和计算机内进行 Office 365 管理。

这为您省去了在多个 Web 控制台之间切换和使用 PowerShell 的所有麻烦。

使用 Easy365Manager,您可以直接从用户属性执行所有日常任务。即使是只能通过 PowerShell 执行的任务,例如日历权限管理:

您可以在任何运行 AD 用户和计算机的计算机上安装 Easy365Manager,并且您的 AD 或 Office 365 无需进行任何配置更改。

Easy365Manager 的安装和配置时间不到三分钟,并且提供 30 天免费试用,完全无风险。

在这里下载免费试用版,开始节省大量时间。

您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

关灯