gpt4 book ai didi

azure - 如何获取 Azure AD 计算机对象的所有详细信息?

转载 作者:行者123 更新时间:2023-12-02 23:42:47 26 4
gpt4 key购买 nike

调用 Get-AzureADDevice 可以获取三个属性。如何获取对象的完整属性列表?具体来说,当我使用 GraphApi 时:

https://graph.microsoft.com/v1.0/devices?$filter=startswith(operatingSystem,'Windows')`

如何在 Powershell 中实现同样的效果?

$aadDevices = Get-AzureADDevice -All 1 获取对象 ID、DeviceID 和显示名称。因此,operatingSystem 上的过滤子句除外。

我正在寻找的是AzureAD中所有计算机对象的列表,以便我可以进行一些自动化处理。

最佳答案

您需要使用-Filter "startswith(DeviceOSType,'Windows')",尝试以下命令。

Get-AzureADDevice -All 1 -Filter "startswith(DeviceOSType,'Windows')"

我的测试样本:

Get-AzureADDevice -All 0 -Top 5 -Filter "startswith(DeviceOSType,'Windows')" | ConvertTo-Json

enter image description here

关于azure - 如何获取 Azure AD 计算机对象的所有详细信息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57501169/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com