How do I pass a local variable to a remote `Invoke-Command`?
<p>I'm trying to retrieve the hash of a file located on remote server using <code>Invoke-Command</code>.  It works fine when I give the full path as below:</p>

<pre><code>Invoke-Command -ComputerName winserver -ScriptBlock { 
    Get-FileHash -Path E:\test\testfile.zip -Algorithm SHA1 
}
</code></pre>

<p>But I need to pass the file name via a variable as below:</p>

<pre><code>Invoke-Command -ComputerName winserver -ScriptBlock { 
    Get-FileHash -Path "E:\test\$dest.zip" -Algorithm SHA1 
}
</code></pre>

<p>How do I access this variable in the <code>scriptblock</code> of a remote session?</p>