9 Replies Latest reply on Jun 7, 2019 12:36 PM by LucD

    Suppress output from Initialize-PowerCLIEnvironment

    ImaRelic Novice

      I've written a report generator in PowerCLI then compiled it using ps2exe.ps1.

      The script calls Initialize-PowerCLIEnvironment.ps1. Everything works nicely except that I cannot specify -noconsole because that script has a number of write-host commands in it.

       

      Is there a simple way to suppress that output from Initialize-PowerCLIEnvironment.ps1?

       

      Any suggestions are appreciated.