Remove-EntraDeviceRegisteredOwner
移除裝置的註冊擁有者。
語法
Default (預設值)
Remove-EntraDeviceRegisteredOwner
-OwnerId <String>
-DeviceId <String>
[<CommonParameters>]
Description
該Remove-EntraDeviceRegisteredOwner指令檔會移除 Microsoft Entra ID 中裝置的註冊擁有者。
在涉及工作或學校帳號的委派情境中,登入使用者必須擁有支援的 Microsoft Entra 角色或具備所需權限的自訂角色。 以下支援的最低權限角色用於此操作:
- Intune 管理員
- Windows 365 管理員
範例
範例 1:將裝置上的擁有者移除
Connect-Entra -Scopes 'Directory.AccessAsUser.All'
$device = Get-EntraDevice -Filter "DisplayName eq 'Woodgrove Desktop'"
$owner = Get-EntraDeviceRegisteredOwner -DeviceId $device.Id | Where-Object {$_.userPrincipalName -eq 'parker@contoso.com'}
Remove-EntraDeviceRegisteredOwner -DeviceId $device.Id -OwnerId $owner.Id
以下範例展示了如何移除裝置擁有者。
參數
-DeviceId
指定物件 ID。
參數屬性
| 類型: | System.String |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
| 別名: | ObjectId (物件識別碼) |
參數集
(All)
| Position: | Named |
| 必要: | True |
| 來自管線的值: | True |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-OwnerId
指定車主識別碼。
參數屬性
| 類型: | System.String |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | Named |
| 必要: | True |
| 來自管線的值: | True |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
CommonParameters
此 Cmdlet 支援一般參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters。