Collect CDP informations with SCCM

Did you ever need to know, to wich network switch a computer is connected? When you are a system administrator in a large company with tousends of users, this can be difficult. But when you use SCCM for OS or Software deployment, you have a good inventory tool integreated. Unfortunately SCCM by default only collect datas which the client operating system knows. Your Windows computers doesn’t known to which switch or port they are connected, but if you have Cisco switches the computers would be able to collect this information. Fact is that switches from Cisco are spreading all 60 seconds a lot of information about them to the connected ports (you can disable this, but by default it’s enabled). So you need only a tool to gather this information an write it to the SCCM.

In my case i wrote a vb-script, which runs a little capture tool tcpdump.exe (http://www.microolap.com/products/network/tcpdump/) and wait for the CDP informations. As soon the CDP informations are gathered, they would be writen to a MIF-file. SCCM collect this files frequently and writes the datas to his Database, where you can use it in an Query or an Report.

This is the script, which i tested with Windows XP SP3 and Windows 7 SP1:

Cause the script need’s elevated user rights, i integrated the script in group policy to run at computer startup.

1 Comment


  1. Thanks, i asked Hey scripting guy about this a while back, he didn’t have an answer. Guess i should forward this on to him

    Reply

Leave a Reply