function FetchCurrentDate() { return $(Get-Date); } function SumVars([int]$a, [int]$b) { $a + $b } function SumVars2 { [CmdletBinding()] param( [Parameter(position=0)] [int]$a, [Parameter(position=1)] [int]$b ) $a+$b } $d = FetchCurrentDate; $x = SumVars 1 2; $x2 = SumVars2 -a 1 -b 2; Write-Host "Current date is $d. Sum is: $x, sum2 is : $x2";