Entries from 2017-04-07 to 1 day
In a function that retrieve parameters from pipeline, if you make a parameter mandatory (Mandatory=$true), you will get error when an empty line is passed from the pipeline. If you receive parameters from the data which may contain empty l…
## Context: A mandatory parameter of a function retrieved from pipeline is defined like this: param( [Parameter(ValueFromPipeline=$true, Mandatory=$true)] [string] $foo ) A mandatory parameter of a function retrieved from argument is defin…