PowerShell with Include script not working

2016-06-07 Thread Gavin Armitage (AU)
Need some advise, I am running a powershell file with a include for another ps1 file. I am using a Windows bat command to run the file via powershell.exe. Please see below for the file details. FunctionB.ps1 *Function Get-ValueFortext()* *{* * return "abc"* *}* FunctionA.ps1 *$ScriptPath = S

Jenkins Powershell Invoke-Command with Environment Variables

2016-06-01 Thread Gavin Armitage (AU)
Hi All, Busy working on a poc on Jenkins, so really new. So my question is as follows, 1. Running a "master" Powershell script to open a session and using invoke-command with the -File switch including the session $cred = New-Object System.Management.Automation.PSCredential -ArgumentList