There are a bunch of new corporate device examples in the PowerShell github for Intune
Guy should get an award for updating this, its pretty much exactly what I’ve been looking for
$FileName_CSV = “CorpDeviceIdentifiers” + “_” + $(get-date -f dd-MM-yyyy-H-mm-ss) + “.csv”
$CDI = Get-CorporateDeviceIdentifiers
if($CDI){
foreach($CD in $CDI){
$IDI = $CD.importedDeviceIdentifier
$Desc = $CD.description
Write-Host “Adding ‘$IDI,$Desc’ to ‘$FileName_CSV’…” -ForegroundColor Gray
Add-Content -Value “$IDI,$Desc” -Path “$ExportPath\$FileName_CSV”
}
}
else {
Write-Host “No Corporate Device Identifiers found…” -ForegroundColor Red
}
Write-Host