This repository was archived by the owner on Dec 1, 2023. It is now read-only.
This repository was archived by the owner on Dec 1, 2023. It is now read-only.
MountLiveNetwork task isn't taking the -Confirm parameter properly. #13
Open
Description
Reported via email from build.rubrik.com
Under the MoveLiveMountNetwork task we are trying to pass a -Confirm $false to the Set-NetworkAdapter command but I’m guessing the syntax changed or something because the command wants -Confirm:$false. I’m not sure how to do that the fancy way so I just added to the command as shown below.
OLD:
# Synopsis: Move a Live Mount to a test network
task MoveLiveMountNetwork {
$i = 0
foreach ($Mount in $MountArray) {
$SplatNetAdapter = @{
NetworkName = $Config.virtualMachines[$i].testNetwork
Connected = $true
Confirm = $false
}
$ValidateNetwork = Get-NetworkAdapter -VM $Config.virtualMachines[$i].mountName |
Set-NetworkAdapter @SplatNetAdapter
NEW:
# Synopsis: Move a Live Mount to a test network
task MoveLiveMountNetwork {
$i = 0
foreach ($Mount in $MountArray) {
$SplatNetAdapter = @{
NetworkName = $Config.virtualMachines[$i].testNetwork
Connected = $true
}
$ValidateNetwork = Get-NetworkAdapter -VM $Config.virtualMachines[$i].mountName |
Set-NetworkAdapter @SplatNetAdapter -Confirm:$false