Hi,
i need a scripts to do things described in the title...i want to add a physical NIC to an existing vSwitch without replacing
the existing/configured NIC in the vSwitch...
My actual script looks like this:
$vs =Get-VirtualSwitch -VMHost $vmHost -Name vSwitch0
$vs | Set-VirtualSwitch -Nic vmnic1
This one replaces the existing NIC 😞
Any idea?
Thx in advance!
Chakoe
I'm glad you solved this problem.
yeah! 🙂
New SnapIn, new Problems ( maybe layer8-problem :smileylaugh: )
I want to remediate a test host ( before i use my script to multiple hosts)...
So i searched the community for a script example and i found this:
http://communities.vmware.com/thread/257905?tstart=0
i tried to modify it to use one defined host...
###
$Baseline = Get-Baseline -TargetType host
Get-VMhost myhost1 | ForEach-Object {
Set-VMhost -vmhost $_ -state maintenance
Remediate-Inventory -Entity $_ -Baseline $Baseline -Confirm:$False
Set-VMhost -vmhost $_ -state connected}
I am connected to our vSphereServer which is also the UpdateManagerServer.
Now I´m getting the following error:
API version '4' for vCenter Server 'virtualcenter.int' is not supported.
Do I have to update something on my VC?
It looks as if you're using a pre-4.x vCenter.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I´m using vsphere VirtualCenter 4.0.....we´re going to update in couple of days or weeks....
ReleaseNotes say that 4.1.. is needed....damn.
It will work then...hopefully..