Add-AzureADDeviceRegisteredUser
Adds a registered user for a device.
Syntax
Default (Default)
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=}
Parameter properties
| Type: | 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 |
-RefObjectId
@{Text=}
Parameter properties
| Type: | 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.
Notes
See the migration guide for Add-AzureADDeviceRegisteredUser to the Microsoft Graph PowerShell.