Remove-EntraDeviceRegisteredOwner
Removes the registered owner of a device.
Syntax
Default (Default)
Remove-EntraDeviceRegisteredOwner
-OwnerId <String>
-DeviceId <String>
[<CommonParameters>]
Description
The Remove-EntraDeviceRegisteredOwner cmdlet removes the registered owner of a device in Microsoft Entra ID.
In delegated scenarios involving work or school accounts, the signed-in user must have a supported Microsoft Entra role or a custom role with the required permissions. The following least privileged roles are supported for this operation:
- Intune Administrator
- Windows 365 Administrator
Examples
Example 1: Remove an owner from a device
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
This examples shows how to remove the owner of a device.
Parameters
-DeviceId
Specifies an object ID.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | ObjectId |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-OwnerId
Specifies an owner ID.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.