VMware Cloud Community
michigun
VMware Employee
VMware Employee
Jump to solution

PowerCLI 5 and Distributed Switches

Hi.

I can't find a comandlets tocreating and working with dvSwitches in PowerCLI 5.

Were these commands removed from current version of PowerCLI?

-- http://www.vm4.ru/p/vsphere-book.html
Reply
0 Kudos
1 Solution

Accepted Solutions
admin
Immortal
Immortal
Jump to solution

Hi,

You are right. The example is about a standard switch.

Currently there is no suppost for creating virtual distributed switch using PowerCLI cmdlets
but there is a team that is working on them, but they are not released yet.

Best regards,
Leni Kirilov

PowerCLI Team

View solution in original post

Reply
0 Kudos
9 Replies
admin
Immortal
Immortal
Jump to solution

Hi,

istributedSwitch  object is returned by Get-VirtualSwitch and can specifiy a parameter "Distributed"

You can modify them using  Set-VirtualSwitch

Check documentation about DistributedSwitch object -> here

The DistributedSwitch object refers to virtual switches and you can use them with:

Get-VM, Get-VMHost, etc

I think all you need is there, only may be with different names if you looked for Get-DistributedVirtualSwitch.

Do these cmdlets cover you cases ?

Best regards,

Leni Kirilov

PowerCLI Team

S
Reply
0 Kudos
michigun
VMware Employee
VMware Employee
Jump to solution

Thanks.

But I confused a little - can't find how I can create dvSwitch and several PG on top.

-- http://www.vm4.ru/p/vsphere-book.html
Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

Hi,

The cmdlet you need is New-VirtualPortGroup

Check its example:

vswitch =  New-VirtualSwitch -VMHost 10.23.114.234 -Name VSwitch 

$vportgroup =  New-VirtualPortGroup -VirtualSwitch $vswitch  -Name VPortGroup

I think this is what you need.

Best regards,

Leni Kirilov

PowerCLI Team

Reply
0 Kudos
michigun
VMware Employee
VMware Employee
Jump to solution

I need to create Distributed Switch first,

and then several Port Groups.

This command can create only standart switch - I tryed it.

-- http://www.vm4.ru/p/vsphere-book.html
Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

Hi,

You are right. The example is about a standard switch.

Currently there is no suppost for creating virtual distributed switch using PowerCLI cmdlets
but there is a team that is working on them, but they are not released yet.

Best regards,
Leni Kirilov

PowerCLI Team

Reply
0 Kudos
michigun
VMware Employee
VMware Employee
Jump to solution

May be it will helpful for someone:

The Author of the Power CLI book create the special module for working with dvSwitches.

It is possible to buy the book and download this module here.

dvsw.png

Who want to buy this book - I strongly recommend to buy the electronic version (I have both version from amazon) - because analog book with 700+ pages with listings is incredible to use.

But the book is useful, I like it.

-- http://www.vm4.ru/p/vsphere-book.html
Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

Hi,

thank you for the link to the book.

Although we don't have a separate cmdlet for this functionality

we have posted a blog on how you can do this using the Views.

Check the post here:

http://blogs.vmware.com/vipowershell/2010/07/vds-in-powercli-41.html

It has a direct copy-paste function.

I hope you like it.

Best regards,

Leni Kirilov

PowerCLI Team

michigun
VMware Employee
VMware Employee
Jump to solution

Thank you, looks very interesting.

-- http://www.vm4.ru/p/vsphere-book.html
Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Thanks for linking to our book.

I think you will find the dvSwitch module very useful.

You can also have a look at some of my dvSwitch related blog posts.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference