Automation

 View Only
  • 1.  Script Output compare when use Invoke-Vmscript

    Posted Oct 30, 2023 10:35 AM

    Hello! have a script to check, If the file exists.

    The problem is that I can't compare Script output with true or false. In this script, even if the file exists, the value NO is returned. How to fix it?

     



  • 2.  RE: Script Output compare when use Invoke-Vmscript
    Best Answer

    Posted Oct 30, 2023 10:58 AM

    The ScriptOutput property also contains a CR-LF.
    With the -match operator you don't have that issue