Author Posts

June 15, 2016 at 7:37 am

Is is possible to pass parmaters into OVF? Or does anyone have simlar issues?

The needs is to test different servers, verify each one before going live.

Currenly I'm hacking it by setting a global Variable before calling Invoke-OperationValidation

$UrlOverride = Get-Variable UrlOverride -Scope Global  -ValueOnly -ErrorAction SilentlyContinue
if ($UrlOverride -ne $null) 
        $Url = $Global:UrlOverride 

which works, but is far from ideal

June 15, 2016 at 10:13 am

My experience has been that you need to do what you have done by setting a variable in the test that gets updated before calling the test or have the test read a config file that contains the variable value(s) and you have to update the file before calling the test.

June 15, 2016 at 12:00 pm

Looks like someone has proposed this already:

Pester supports it already, but not sure about OVF. (Presumably not, or that issue wouldn't exist.)

June 16, 2016 at 12:19 am

I totally missed/misunderstood the -Script parameter in Pester