Query Details

Network Info Per Device

Query

DeviceNetworkInfo
| where DeviceName contains "PCNAME"
| where TimeGenerated > ago (90d)
| where NetworkAdapterType == "Wireless80211"
| where ConnectedNetworks != ''
| extend ParsedNetwork = parse_json(ConnectedNetworks)
| extend NetworkName = tostring(ParsedNetwork[0].Name),
         Description = tostring(ParsedNetwork[0].Description),
         IsConnectedToInternet = toboolean(ParsedNetwork[0].IsConnectedToInternet),
         Category = tostring(ParsedNetwork[0].Category)
| project Timestamp, DeviceName, NetworkAdapterName, NetworkName, Description, IsConnectedToInternet, Category, IPAddresses, MacAddress
| order by Timestamp desc

Explanation

This query is designed to retrieve and display information about wireless network connections for a specific device over the past 90 days. Here's a simple breakdown:

  1. Source Table: The query starts with the DeviceNetworkInfo table, which contains network-related data for devices.

  2. Filter by Device Name: It filters the data to include only records where the device name contains "PCNAME".

  3. Filter by Time: It further narrows down the data to include only records generated in the last 90 days.

  4. Filter by Network Type: It selects only those records where the network adapter type is "Wireless80211", indicating a wireless connection.

  5. Exclude Empty Networks: It excludes records where there are no connected networks.

  6. Parse Connected Networks: It parses the JSON data in the ConnectedNetworks field to extract detailed information about the network.

  7. Extract Network Details: It extracts specific details from the parsed JSON, including:

    • NetworkName: The name of the network.
    • Description: A description of the network.
    • IsConnectedToInternet: A boolean indicating if the network is connected to the internet.
    • Category: The category of the network.
  8. Select and Order Columns: It selects specific columns to display: Timestamp, DeviceName, NetworkAdapterName, NetworkName, Description, IsConnectedToInternet, Category, IPAddresses, and MacAddress. The results are ordered by Timestamp in descending order, showing the most recent records first.

In summary, this query provides a detailed view of wireless network connections for a particular device over the last 90 days, including network names, descriptions, internet connectivity status, and other relevant details.

Details

Daniel Card profile picture

Daniel Card

Released: February 27, 2025

Tables

DeviceNetworkInfo

Keywords

DeviceNetworkNetworkAdapterNetworkNameDescriptionCategoryIPAddressesMacAddressTimestamp

Operators

DeviceNetworkInfowherecontainsagoextendparse_jsontostringtobooleanprojectorder bydesc

Actions