vLanIdentificator – for checking subnets for Virtual Machines and their vlan info.

by Grzegorz Kulikowski

I have created this tiny program that will help me sometimes look for other vms that are supposed to sit inside some particular vlan/subnet. The idea is really simple. You are given an ip and somebody is asking you which vlan is that , for example. If you don’t have a hobby of memorizing vlans in your networks might try to use this program. If given a particular IP, and netmask, it will scan all ips within it and check if you have Virtual Machines in Virtual Center that are utilizing ips from that range. In addition it will tell you where the VM is being hosted and which portgroup on esxi hostsystem it is utilizing and of course its vlan id. I hope some of you may find it useful. Executable is prepared for powershell version 3. In general i guess it’s compatible only with >PowerShell 3 , since how i wrote it. I have not tested it yet with Distributed Switches. I have not tested it on other version than vsphere 5.0.If you test it on different version , let me know in the comment. I will make sure it runs ok with vDS as well soon. VMware tools need to be installed in VM in order to report the IP back. This tiny program basically just runs a loop for ips utilizing SearchIndex and its FindAllByIp function. There isn’t much magic happening here 😉 In order to write it i used Get-IPrange by Barry Chum – https://goo.gl/TBYujC IP regex – http://goo.gl/Ow7PFf On the computer on which you want to run it , you will need to have PowerCLI installed. When you are asked for credentials, read-only permission will be enough to retrieve information. Screenshot of how it looks is below. vlanidentificator Executable can be found HERE PSF (Powershell Studio) source code can be found HERE No this is not finished 😉 I am still learning windows forms, so that’s why it looks like it looks. Most important for now , is that it does its job. –Update 21/07/2015 Added support for VMware Distributed Switches Fixed minor bugs

You may also like

Leave a Reply

Chinese (Simplified)EnglishFrenchGermanHindiPolishSpanish