Meraki switch JSON


Meraki devices have status pages. These can be accessed by internal clients. See

For example, if you’re on a PC connected to a Meraki switch you can connect to which gives you a status page about your connection.  This page has javascript to fetch data from a json document at I’m reading this JSON from PowerShell at  machine startup to dynamically track PC to switch port mappings. For example, you could write this to the registry and extend SCCM hardware inventory to collect this as a machine property.  Or write it to an AD machine account property.

$MerakiJSON=invoke-restmethod -Uri
write-host "I'm connected to $($MerakiJSON.config.node\_name) port $($MerakiJSON.client.port) which is configured as VLAN $($MerakiJSON.client.vlan)"


I'm connected to MS220-8P-LON2 port 5 which is configured as VLAN 2