Scripting >> Powershell >> Syntax >> Arrays - Constants - Functions - Variables

Arrays ====== Initialize by $a = 1,2,3,4 Query by $b = $a[3] Constants ========= Created without $ Set-Variable -name pi -value 3.142 -option constant Referenced with $ $pi Functions ========= Parameters separated by space. Return is optional function sum ( [int]$a, [int]$b ) { return $a + $b } Calling the function:- sum 4 5 Variables ========= Must start with $ $a = 32 Can be typed [int]$a = 32