Quantcast
Channel: David Hill
Viewing all articles
Browse latest Browse all 173

Enumerate network adapters Powershell (PowerCLI) – VMware vmnic

$
0
0


This is a script I wrote a while ago to enumerate network adapters Powershell (PowerCLI) and add the total amount to a variable. I thought some people may find it useful. enumerate network adapters Powershell What I am achieving here is actually enumerating (count) the number of vmnic’s in a host. Why? Well if you think about automating your ESXi deployment, not all physical hosts have the same configurations, some have 4 1GB Nic’s others have 2 10GB nics, however you want to have a standard build for all configurations. This is an easy way to be able to automatically create the portgroups required without having to change your builds for different configurations. The script below shows how you can easily count the total number of vmnics and add to the variable no_nics. In a follow up post, I will be showing how to take this total vmnic count and create virtual machine port groups using an array.

Viewing all articles
Browse latest Browse all 173

Trending Articles