Hi Luc, That worked a treat. In had a look lucd.info Yesterday but didn't find it for some reason. - Thanks for the quick reply. Here is the full Syntax that i used param( [Parameter(...
See more...
Hi Luc, That worked a treat. In had a look lucd.info Yesterday but didn't find it for some reason. - Thanks for the quick reply. Here is the full Syntax that i used param( [Parameter(Mandatory=$true)]$vCenter, $datacenterName = "DC01", $dvSwitchName = "DVswitch01-A", $dvSwitchUplinkBasename = "dvUp1", $dvSwitchUplinkNumber = "2", $dvPgNumPorts = "8" ) function Set-dvSwSIOC{ param( [parameter(Position = 0, Mandatory = $true, ValueFromPipeline = $true)] [VMware.Vim.VmwareDistributedVirtualSwitch]$dvSw, [parameter(Position = 1)] [switch]$Enabled ) $dvSw.EnableNetworkResourceManagement($Enabled) } #Creates new Switch New-VDSwitch -Name $dvSwitchName -Mtu 9000 -NumUplinkPorts $dvSwitchUplinkNumber -Location $datacenterName $dvSw = Get-dvSwitch -DatacenterName $datacenterName -dvSwitchName $dvSwitchName Set-dvSwSIOC -dvSw $dvSw -Enabled