Add-​Azure​AD​Device​Registered​User

Adds a registered user for a device.

Syntax

Add-AzureADDeviceRegisteredUser
   -ObjectId <String>
   -RefObjectId <String>
   [<CommonParameters>]

Description

The Add-AzureADDeviceRegisteredUser cmdlet adds a registered user for an Azure Active Directory device.

Examples

Example 1: Add a user as a registered user

PS C:\> $User = Get-AzureADUser -Top 1
PS C:\> $Device = Get-AzureADDevice -Top 1
PS C:\> Add-AzureADDeviceRegisteredUser -ObjectId $Device.ObjectId -RefObjectId $User.ObjectId

The first command gets a user by using the Get-AzureADUser cmdlet, and then stores it in the $User variable.

The second command gets a device by using the Get-AzureADDevice cmdlet, and then stores it in the $Device variable.

The final command adds the user in $User as the registered user for the device in $Device. Both parameters use the ObjectId property of specified object.

Required Parameters

-ObjectId
Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
-RefObjectId
Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False