I'm adding items to an array called $MissingIps using the following command

    $MissingIps = @("")
    [System.Collections.ArrayList]$ExistingIps = $MissingIps
    if ($lbips -notcontains $awsip){

On execution, powershell automatically echos the index position, and I'm struggling to hide that.

Any ideas?


Add | out-null to the line where you want to hide the output.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.