In scripting, there are many things to experience in many ways, the traditional way is always the best practice though, the formal way is always an option…
Function Add
{
param
(
[Parameter(Mandatory=$true)]
[int] $Number1,
[Parameter(Mandatory=$true)]
[int] $Number2
)
[int] $Sum = 0
$Sum = $Number1 + $Number2
return, $Sum
}
Add -Number1 4 -Number2 5
$Add = {$args[0] + $args[1]}
. $Add 4 5