Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

MountLiveNetwork task isn't taking the -Confirm parameter properly. #13

Open
mwpreston opened this issue Oct 28, 2020 · 0 comments
Open
Labels

Comments

@mwpreston
Copy link
Contributor

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant