Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Virtualization

Use PowerCLI to Change NIC Type

Submitted by on April 17, 2017 – 11:52 am One Comment

This is a quick PowerCLI script that reads from a list of VM names and for each VM with network adapter type “E1000” changes it to “Vmxnet3”. Nothing fancy, no reboot is needed. MAC should stay the same, but this depends on your cluster network configuration.

Set-PowerCLIConfiguration -Scope Session -WebOperationTimeoutSeconds -1 -Confirm:$false;
Import-Module VMware.VimAutomation.Vds;
$VMHost="vcenter01.domain.com";
Connect-VIServer -Server $VMHost -User 'DOMAIN\User' -Password 'Password1';

foreach($line in Get-Content C:\vm_list.txt) {
Get-VM "$line" | get-networkAdapter | Where { $_.Type -eq "E1000"} | set-NetworkAdapter -Type "Vmxnet3" -confirm:$false
}



 

Print Friendly, PDF & Email

One Comment »

Leave a Reply

%d bloggers like this: