Difference between revisions of "Power Shell"

Jump to navigation Jump to search
280 bytes added ,  10:33, 9 August 2010
→‎Variables: Added Hashtables
(→‎Variables: Added [timespan])
(→‎Variables: Added Hashtables)
Line 157: Line 157:
=== Arrays ===
=== Arrays ===
<source lang="powershell">
<source lang="powershell">
$array = @()             # Create blank 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 ===

Navigation menu