Skip to content

Instantly share code, notes, and snippets.

@mattmcnabb
Created May 1, 2015 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattmcnabb/2327558eef31d2a5e0c7 to your computer and use it in GitHub Desktop.
Save mattmcnabb/2327558eef31d2a5e0c7 to your computer and use it in GitHub Desktop.
Begin Block Variable
function Test-BeginBlock
{
[CmdletBinding()]
param
(
[parameter(ValueFromPipeline)]
$Parameter1
)
begin { $Variable1 = 'whatev' }
process
{
"Process Block Parameter1: $Parameter1"
"Process Block Variable1: $Variable1"
}
end {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment