New-EntraDevice
Creates a device.
Syntax
New-EntraDevice
-DisplayName <String>
-DeviceOSType <String>
-AccountEnabled <Boolean>
-DeviceId <String>
-DeviceOSVersion <String>
-AlternativeSecurityIds <System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId]>
[-DevicePhysicalIds <System.Collections.Generic.List`1[System.String]>]
[-DeviceTrustType <String>]
[-DeviceMetadata <String>]
[-ApproximateLastLogonTimeStamp <DateTime>]
[-IsManaged <Boolean>]
[-DeviceObjectVersion <Int32>]
[-IsCompliant <Boolean>]
[-ProfileType <String>]
[-SystemLabels <System.Collections.Generic.List`1[System.String]>]
[<CommonParameters>]
Description
The New-EntraDevice
cmdlet creates a device in Microsoft Entra ID.
The calling user must be in one of the following Microsoft Entra roles: Intune Administrator or Windows 365 Administrator.
Examples
Example 1: Create a device
Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All'
$params = @{
AccountEnabled = $true
DisplayName = 'My new device'
AlternativeSecurityIds = $altsecid
DeviceId = $guid
DeviceOSType = 'OS/2'
DeviceOSVersion = '9.3'
}
New-EntraDevice @params
ObjectId DeviceId DisplayName
-------- -------- -----------
aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb dddddddd-3333-4444-5555-eeeeeeeeeeee My new device
This command creates a new device.
Parameters
-AccountEnabled
Indicates whether the account is enabled.
Type: | System.Boolean |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AlternativeSecurityIds
Specifies alternative security IDs.
Type: | System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ApproximateLastLogonTimeStamp
Specifies last sign-in date time.
Type: | System.DateTime |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DeviceId
Specifies the ID of the device.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DeviceMetadata
The metadata for this device
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DeviceObjectVersion
Specifies the object version of the device.
Type: | System.Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DeviceOSType
Specifies the operating system type of the new device.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DeviceOSVersion
Specifies the operating system version of the new device.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DevicePhysicalIds
Specifies the physical ID.
Type: | System.Collections.Generic.List`1[System.String] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DeviceTrustType
The trust type for this device
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DisplayName
Specifies the display name of the new device.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IsCompliant
True if the device complies with Mobile Device Management (MDM) policies; otherwise, false.
Type: | System.Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IsManaged
True if the device is managed by a Mobile Device Management (MDM) app such as Intune; otherwise, false.
Type: | System.Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProfileType
Specifies profile type of the device.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SystemLabels
Specifies labels for the device.
Type: | System.Collections.Generic.List`1[System.String] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |