powershell-tricks
  • Introduction
  • Run Remote Script from Host
  • Expand Array as Parameter
  • Output a Hashtable
  • Use Add-Type without Pollute Current Session
  • Get-Location is the execution path.
  • About Dot Sourcing
  • About ScriptBlock
Powered by GitBook
On this page

About ScriptBlock

Use & to execute it. Use param to define args just like functions.

If sometime you cannot get the correct behavior for a piping output, use a scriptblock to wrap and execute it.

& { & xunit.runner.exe "test.dll" } | Output-Default
PreviousAbout Dot Sourcing

Last updated 7 years ago