Get-EntraUserRegisteredDevice
讓使用者註冊裝置。
語法
Default (預設值)
Get-EntraUserRegisteredDevice
-UserId <String>
[-All]
[-Top <Int32>]
[-Property <String[]>]
[<CommonParameters>]
Description
這個 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
此指令取得已登記給指定使用者的裝置。
範例二:取得所有註冊裝置
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
此指令取得所有已註冊給指定使用者的裝置。
範例三:取得一個註冊裝置
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 |
| 別名: | 選取 |
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-Top
指定最多要回傳的紀錄數量。
參數屬性
| 類型: | System.Int32 |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
| 別名: | 極限 |
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | True |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-UserId
在 Microsoft Entra ID 中指定使用者的 ID(作為使用者主體名稱或使用者 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。