Simple PowerShell project.
This commit is contained in:
parent
203f44f3cc
commit
4a14834eef
4 changed files with 84 additions and 0 deletions
|
@ -0,0 +1,27 @@
|
|||
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";
|
Loading…
Add table
Add a link
Reference in a new issue