Thanks for the quick reply.
I just updated the command to as follows
Get-VM -Name 1 | Get-NetworkAdapter | Set-NetworkAdapter -DistributedSwitch dvSwitch2 -PortKey 10
The bold parts at the updates to the original code.
after running this I get the following error
Set-NetworkAdapter : 30/01/2013 11:37:03 Set-NetworkAdapter The specified port '10' does not exists or it's not available for vnic connection.
I have uploaded a screenshot showing that the vDS and portgroup, portkey exists.
Thanks