2,187
edits
(→Variables: Added [timespan]) |
(→Variables: Added Hashtables) |
||
Line 157: | Line 157: | ||
=== Arrays === | === Arrays === | ||
<source lang="powershell"> | <source lang="powershell"> | ||
$array = @() | $array = @() # Create blank array | ||
$array += 34 # Add value to end of array | $array += 34 # Add value to end of array | ||
</source> | </source> | ||
=== Hashtables === | |||
<source lang="powershell"> | |||
$hash = @{} # Create blank array | |||
$hash["Name"] = "Value" # Add value to end of array | |||
$hash.GetEnumerator() | Sort-Object -Property Name # Sort hashtable | |||
</source> | |||
=== Datetime === | === Datetime === |