Collect Cellular data with PowerShell

A common way to get cellular data is by using the command:

netsh mbn show readyinfo * | findstr SIM```

If you can run a script in the SYSTEM context, you can use the "MDM Bridge WMI Provider" to get some deeper insights... (MDM Bridge WMI Provider - Win32 apps | Microsoft Docs).

The required information is coming from the "DeviceStatus CSP" (DeviceStatus CSP - Windows Client Management | Microsoft Docs) where you have "CellularIdentities" which includes:

  • IMEI
  • IMSI
  • PhoneNumber
  • CommercializationOperator (Telecom Provider)
  • Roaming Status
  • RoaminCompliance

You can use the following PowerShell command (running as SYSTEM) to get all these Information:

Get-WmiObject -Namespace "root\cimv2\mdm\dmmap" -ClassName MDM_DeviceStatus_CellularIdentities01_01