Skip to content

Get-IntuneDevice

SYNOPSIS

Retrieves Intune managed device details by DeviceId, DeviceName, or primary user UPN.

SYNTAX

ById (Default)

Get-IntuneDevice -DeviceId <string> [<CommonParameters>]

ByName

Get-IntuneDevice -DeviceName <string[]> [<CommonParameters>]

ByUser

Get-IntuneDevice -UserPrincipalName <string> [<CommonParameters>]

ALIASES

This cmdlet has the following aliases, {{Insert list of aliases}}

DESCRIPTION

Queries Microsoft Graph (beta) for managed device details and returns a compact device summary. Supports lookup by managed device ID, by device name, or by the primary user's UPN.

Requires an authenticated Graph session with appropriate scopes.

Scopes (minimum): - DeviceManagementManagedDevices.Read.All

EXAMPLES

EXAMPLE 1

Connect-MgGraph -Scopes "DeviceManagementManagedDevices.Read.All","User.Read.All" Get-IntuneDevice -DeviceId "c1f5d1d7-2d2b-4d8c-9f0a-0d2a3d1e2f3a"

Retrieves summary details for the specified managed device.

EXAMPLE 2

Get-IntuneDevice -DeviceName PC-001

Resolves device by name and returns summary details for each matching managed device.

EXAMPLE 3

Get-IntuneDevice -UserPrincipalName jane.doe@contoso.com

Returns summary details for all managed devices whose primary user is jane.doe@contoso.com.

PARAMETERS

-DeviceId

The Intune managed device identifier (GUID). Parameter set: ById.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases:
- Id
- ManagedDeviceId
ParameterSets:
- Name: ById
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-DeviceName

One or more device names to resolve in Intune managed devices. Parameter set: ByName. If multiple devices share the same name, all matches are returned. Accepts multiple names via array or pipeline.

Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases:
- Name
- ComputerName
ParameterSets:
- Name: ByName
  Position: Named
  IsRequired: true
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-UserPrincipalName

The UPN of the primary user whose devices should be returned. Parameter set: ByUser. If the user has multiple enrolled devices, all matches are returned.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases:
- UPN
- PrimaryUser
ParameterSets:
- Name: ByUser
  Position: Named
  IsRequired: true
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

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.

INPUTS

System.String (DeviceId

{{ Fill in the Description }}

System.String

{{ Fill in the Description }}

System.String[]

{{ Fill in the Description }}

OUTPUTS

PSCustomObject with the following properties

  • DeviceName (string)
  • PrimaryUser (string)
  • DeviceManufacturer (string)
  • DeviceModel (string)
  • OperatingSystem (string)
  • SerialNumber (string)
  • Compliance (string)
  • LastSyncDateTime (datetime)

{{ Fill in the Description }}

System.Management.Automation.PSObject

{{ Fill in the Description }}

NOTES

Author: FHN & GitHub Copilot Uses /beta Graph endpoints for managed device properties.

{{ Fill in the related links here }}