Get-EntraUserRegisteredDevice
获取用户注册的设备。
语法
Default (默认值)
Get-EntraUserRegisteredDevice
-UserId <String>
[-All]
[-Top <Int32>]
[-Property <String[]>]
[<CommonParameters>]
说明
该 Get-EntraUserRegisteredDevice cmdlet 获取用户在 Microsoft Entra ID 中注册的设备。
示例
示例 1:获取已注册的设备
Connect-Entra -Scopes 'User.Read.All'
Get-EntraUserRegisteredDevice -UserId 'SawyerM@contoso.com' | Select-Object Id -ExpandProperty AdditionalProperties
@odata.type : #microsoft.graph.device
accountEnabled : True
approximateLastSignInDateTime : 1/6/2025 9:01:45 AM
createdDateTime : 11/13/2024 5:11:46 AM
deviceCategory : Digital IT Owned Device
deviceId : 00aa00aa-bb11-cc22-dd33-44ee44ee44ee
deviceOwnership : Company
deviceVersion : 2
displayName : Digital-IT-DevBox
enrollmentType : AzureDomainJoined
isCompliant : False
isManaged : True
isRooted : False
managementType : MDM
manufacturer : Microsoft Corporation
mdmAppId : XXXXX-0000-0000-c000-000000000000
model : Surface Pro X
operatingSystem : Windows
operatingSystemVersion : 10.0.22631.4460
physicalIds : {[USER-GID]:xxxxxxxx}
profileType : RegisteredDevice
registrationDateTime : 11/13/2024 5:11:44 AM
systemLabels : {}
trustType : AzureAd
extensionAttributes :
alternativeSecurityIds : {@{type=2; key=WAA1}}
Id : 11bb11bb-cc22-dd33-ee44-55ff55ff55ff
此命令获取注册到指定用户的设备。
示例 2:获取所有已注册的设备
Connect-Entra -Scopes 'User.Read.All'
Get-EntraUserRegisteredDevice -UserId 'SawyerM@contoso.com' -All | Select-Object Id -ExpandProperty AdditionalProperties
@odata.type : #microsoft.graph.device
accountEnabled : True
approximateLastSignInDateTime : 1/6/2025 9:01:45 AM
createdDateTime : 11/13/2024 5:11:46 AM
deviceCategory : Digital IT Owned Device
deviceId : 00aa00aa-bb11-cc22-dd33-44ee44ee44ee
deviceOwnership : Company
deviceVersion : 2
displayName : Digital-IT-DevBox
enrollmentType : AzureDomainJoined
isCompliant : False
isManaged : True
isRooted : False
managementType : MDM
manufacturer : Microsoft Corporation
mdmAppId : XXXXX-0000-0000-c000-000000000000
model : Surface Pro X
operatingSystem : Windows
operatingSystemVersion : 10.0.22631.4460
physicalIds : {[USER-GID]:xxxxxxxx}
profileType : RegisteredDevice
registrationDateTime : 11/13/2024 5:11:44 AM
systemLabels : {}
trustType : AzureAd
extensionAttributes :
alternativeSecurityIds : {@{type=2; key=WAA1}}
Id : 11bb11bb-cc22-dd33-ee44-55ff55ff55ff
此命令获取注册到指定用户的所有设备。
示例 3:获取一个已注册的设备
Connect-Entra -Scopes 'User.Read.All'
Get-EntraUserRegisteredDevice -UserId 'SawyerM@contoso.com' -Top 1 | Select-Object Id -ExpandProperty AdditionalProperties
@odata.type : #microsoft.graph.device
accountEnabled : True
approximateLastSignInDateTime : 1/6/2025 9:01:45 AM
createdDateTime : 11/13/2024 5:11:46 AM
deviceCategory : Digital IT Owned Device
deviceId : 00aa00aa-bb11-cc22-dd33-44ee44ee44ee
deviceOwnership : Company
deviceVersion : 2
displayName : Digital-IT-DevBox
enrollmentType : AzureDomainJoined
isCompliant : False
isManaged : True
isRooted : False
managementType : MDM
manufacturer : Microsoft Corporation
mdmAppId : XXXXX-0000-0000-c000-000000000000
model : Surface Pro X
operatingSystem : Windows
operatingSystemVersion : 10.0.22631.4460
physicalIds : {[USER-GID]:xxxxxxxx}
profileType : RegisteredDevice
registrationDateTime : 11/13/2024 5:11:44 AM
systemLabels : {}
trustType : AzureAd
extensionAttributes :
alternativeSecurityIds : {@{type=2; key=WAA1}}
Id : 11bb11bb-cc22-dd33-ee44-55ff55ff55ff
此命令获取注册到指定用户的最上面一台设备。 您可以将 -Limit 用作 -Top 的别名。
参数
-All
列出所有页面。
参数属性
| 类型: | System.Management.Automation.SwitchParameter |
| 默认值: | False |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Property
指定要返回的属性
参数属性
| 类型: | System.String[] |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | Select |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Top
指定要返回的最大记录数。
参数属性
| 类型: | System.Int32 |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | Limit |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-UserId
指定Microsoft Entra ID中用户(作为用户主体名称或 UserId)的 ID。
参数属性
| 类型: | System.String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | 对象标识符 (ObjectId), UPN, Identity, UserPrincipalName |
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。