Quantcast
Channel: Microsoft – JeffOps
Viewing all articles
Browse latest Browse all 120

PowerShell oneliner to enable VM Network Optimization in VMM

$
0
0

Here’s how you can enable the VM Network Optimization on all network adapters on a VM:

Get-VM -Name VM01 -VMMServer localhost | Set-VirtualNetworkAdapter -VMNetworkOptimizationEnabled $True


And here’s how you can do the same for all VM’s:

Get-VM -VMMServer localhost | ForEach-Object { Set-VirtualNetworkAdapter -VMNetworkOptimizationEnabled $True }


And last is how you can enable them for all VM’s but only on those where it isn’t configured yet:

Get-VM -VMMServer localhost | Select-Object -ExpandProperty VirtualNetworkAdapters | where { $_.VMNetworkOptimizationEnabled -eq $False } | ForEach-Object { Set-VirtualNetworkAdapter -VMNetworkOptimizationEnabled $True }

 

Note: These commands use the VMM cmdlets!

Post to Twitter


Viewing all articles
Browse latest Browse all 120

Trending Articles