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

[玩转系统] Find-MgGraphCommand:URI 无效

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

Find-MgGraphCommand:URI 无效


[玩转系统] Find-MgGraphCommand:URI 无效

在某些情况下,您会收到以下错误消息:

Find-MgGraphCommand : URI ' https://graph.microsoft.com/v1.0/[some command]' in  is not valid or
  is not currently supported by the SDK. Ensure the URI is formatted correctly and try again.
At line:1 char:1
+ Find-MgGraphCommand [some command]
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Find-MgGraphCommand

当您尝试执行 Find-MgGraphCommand 时,会出现此错误消息。

Find-MgGraphCommand 是一个很好的命令,可用于识别 Microsoft Graph PowerShell 命令的重要方面,例如:

  • 什么模块保存这个命令?
  • 运行此命令需要什么范围(权限)?

抛出错误消息是因为 Find-MgGraphCommand 需要“-Command”开关,如下所示:

PS C:\> Find-MgGraphCommand -Command Get-MgUser


   APIVersion: v1.0

Command    Module Method URI              OutputType           Permissions
-------    ------ ------ ---              ----------           -----------
Get-MgUser Users  GET    /users           IMicrosoftGraphUser1 {DeviceManagementApps.Read.All, DeviceManagem...
Get-MgUser Users  GET    /users/{user-id} IMicrosoftGraphUser1 {DeviceManagementApps.Read.All, DeviceManagem...


   APIVersion: beta

Command    Module Method URI              OutputType          Permissions
-------    ------ ------ ---              ----------          -----------
Get-MgUser Users  GET    /users/{user-id} IMicrosoftGraphUser {DeviceManagementApps.Read.All, DeviceManageme...
Get-MgUser Users  GET    /users           IMicrosoftGraphUser {DeviceManagementApps.Read.All, DeviceManageme...

无需 PowerShell 即可实现超快速管理

如果您厌倦了不断地在 Google 上搜索 PowerShell 命令并且只想完成工作,那么您应该尝试 Easy365Manager。

Easy365Manager 是 Active Directory 用户和计算机的管理单元,允许您直接从 AD 用户和计算机执行所有日常 Office 365 管理。

您甚至可以管理仅受 PowerShell 支持的设置,例如外部转发和日历权限:

立即下载试用版,可节省 50-75% 的 Office 365 管理时间。

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

取消回复欢迎 发表评论:

关灯