This code will create a new Distributed switch at the datacenter level of your vcenter.
Keep in mind that distributed switchs are vCenter objects instead of host objects.
If you are running vcenter 5.1 and deploying distributed switches, I highly suggest the vDS backup script here > http://www.pcli.me/?paged=41
Add-PSSnapin VMware.VimAutomation.Vds
new-vdswitch -name “MyNewvDS”-location “MyDataCenterName” -mtu 9000
VMware Link:
http://www.vmware.com/support/developer/PowerCLI/PowerCLI51R2/html/New-VDSwitch.html