So this is my code
$result = Invoke-Command -Session $session -FilePath $ps1
How do I get the result given by $ps1?
The code of that function is supposed to give a true false result like in the following:
if ($JobStatus -like "Running")
{
$result = $false
Write-Host "Gresit" -foreground Red
}
else
{
$result = $true
Write-Host "Corect" -foreground Green
}