Skip to content

Instantly share code, notes, and snippets.

@PixelRobots
Created October 26, 2021 13:14
Show Gist options
  • Select an option

  • Save PixelRobots/6c6ba584fdd4825a68161c9b47d31bc2 to your computer and use it in GitHub Desktop.

Select an option

Save PixelRobots/6c6ba584fdd4825a68161c9b47d31bc2 to your computer and use it in GitHub Desktop.

Revisions

  1. PixelRobots revised this gist Oct 26, 2021. No changes.
  2. PixelRobots created this gist Oct 26, 2021.
    13 changes: 13 additions & 0 deletions capturehelmkubectloutput.ps1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@

    $command = $(helm uninstall me 2>&1)

    if ($command -match 'error' ) {
    write-host "error = $command" -ForegroundColor Red
    }


    $command = $(kubectl apply -f me.yaml 2>&1)

    if ($command -match 'errror' ) {
    write-host "error = $command" -ForegroundColor Red
    }