Add-AzureADDeviceRegisteredUser
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 (./Get-AzureADUser.md)cmdlet, and then stores it in the $User variable.
The second command gets a device by using the Get-AzureADDevice (./Get-AzureADDevice.md)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.
Parameters
-ObjectId
@{Text=}
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RefObjectId
@{Text=}
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Notes
See the migration guide for Add-AzureADDeviceRegisteredUser to the Microsoft Graph PowerShell.