From the doc about_functions: The following example is a function called Get-SmallFiles. This function has a $size parameter. The function displays all the files that are smaller than the value of the $size parameter, and it excludes directories: function Get-SmallFiles { param ($size) Get-ChildItem c:\ | where {$_.Length -lt $Size -and !$_.PSIsContainer} } In the function, you can use the $size variable, which is the name defined for the parameter. To use this function, type the following command: C:\PS> function Get-SmallFiles –Size 50 You can also enter a value for a named parameter without the parameter name. For example, the following command gives the same result as a command that names the Size parameter: C:\PS> function Get-SmallFiles 50Technically, you wouldn't use the keyword "function" when RUNNING the thing, right?
Where do you see this documentation issue.
Please wait...