Hi @chrisslicious-os ,
based on this website -IP
accepts a string. But you are tyring to insert an array. This might be the isssue.
https://vdc-repo.vmware.com/vmwb-repository/dcr-public/6fb85470-f6ca-4341-858d-12ffd94d975e/4bee17f3-579b-474e-b51c-898e38cc0abb/doc/New-VMHostNetworkAdapter.html
Could please try to use only one IP for $vMotionIps
to see if the script is working.
If you would like to add all three vMotionIps it might be required to use a foreach
loop.
Not tested!
$vmHosts = Get-VMHost
$vMotionIps = @("192.168.0.1","192.168.0.2","192.168.0.3")
foreach ($vmhost in $vmHosts)
{
$vss= Get-VirtualSwitch -VMHost $vmHost -Name vSwitch0
foreach ($vMotionIp in $vMotionIps) {
New-VMHostNetworkAdapter -VMHost $vmHost -PortGroup vMotion -VirtualSwitch $vss -VMotionEnabled:$true -IP $vMotionIp -Subnetmask 255.255.255.0
}
}
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten