Configure vSS and vDS settings using command line tools

I already talked about Standard Switches in:

So here I will play little with Distributed one !

PowerCLI C:> get-command *net* | Where-Object {$_.CommandType -eq ‘cmdlet’}

Another one: get-command *switch* | Where-Object {$_.CommandType -eq ‘cmdlet’}

New-VDSwitch -Name


PowerCLI C:> get-command *switch* | Where-Object {$_.CommandType -eq ‘cmdlet’}

PowerCLI C:> Get-VDSwitch -Name

Create VDS portgroups:

PowerCLI C:> Get-VDSwitch

Verifying created settings:

Host: has a 3 Nics in Standard vSwitch0:

Let’s take 2 ones:

First we need to know what Nics we have as we are connected on vCenter not a single host, So we list all VMNICs we have in our cluster

PowerCLI C:> Get-VMHostNetworkAdapter -Physical -Name vmnic* | Select-object VMHost,DeviceName,Mac

$vmhostNetworkAdapter = Get-VMHost “” | Get-VMHostNetworkAdapter -Physical -Name vmnic2

Get-VDSwitch “March” | Add-VDSwitchPhysicalNetworkAdapter -VMHostNetworkAdapter $vmhostNetworkAdapter

This error because we did not add the host to the dVswitch:

PowerCLI C:> Get-VDSwitch -Name “March” | Add-VDSwitchVMHost -VMHost “”, “”

Verifying Uplink from the switch:


About Ahmad Sabry ElGendi
This entry was posted in Uncategorized, VCAP5-DCA, Vmware. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s