Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Problem using PSEval



  • I'm sure I'm just doing something wrong here but I haven't been able to figure it out.
    I'm trying to use PSEval in the following:

    set $regExists = $PSEval(Test-Path $regPath);

    The reg path being used is like this:

    HKLM:\SOFTWARE\Wow6432Node\Solutions\Interface (node)

    When it is run via Powershell directly I get true or false. When I run it via a plan in BM i get the Cannot assign a Vector value to a Scalar variable error.

    I've tried variations as well, such as forcing it to string like so:

    set $regExists = $PSEval((Test-Path $regPath).ToString());

    But that ends up giving an error about Missing closing ')' in expression.
    which there isn't one missing.

    Product: BuildMaster
    Version: 5.7.3



  • Try:

        set $regExists = $PSEval("Test-Path $regPath");

Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation