Let's assume I have the following script block

```
$scriptBlock={
   $isRemote=.....
}

```

If I do

```
Invoke-Command -ScriptBlock $scriptBlock

```

I expect $isRemote to be false.

If I do

```
Invoke-Command -ComputerName "EXAMPLE" -ScriptBlock $scriptBlock

```

I expect $isRemote to be true.

How can I populate the `$isRemote`. I suppose the same reasoning will apply when executing within a remote session.