Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| powershell:qnd:powershell [2023/02/02 18:12] – [Hash Table] mgupton | powershell:qnd:powershell [2024/10/24 14:24] (current) – [Select Objects] mgupton | ||
|---|---|---|---|
| Line 103: | Line 103: | ||
| foreach ($i in $t1.GetEnumerator()) { | foreach ($i in $t1.GetEnumerator()) { | ||
| - | $i | + | $i.value |
| } | } | ||
| </ | </ | ||
| Line 112: | Line 112: | ||
| $t1 = @{firstname = " | $t1 = @{firstname = " | ||
| - | foreach ($i in $t1.keys()) { | + | foreach ($i in $t1.keys) { |
| $t1[$i] | $t1[$i] | ||
| } | } | ||
| Line 131: | Line 131: | ||
| Example of getting just the first item of the listed output | Example of getting just the first item of the listed output | ||
| <code powershell> | <code powershell> | ||
| - | ls | select first 1 | + | ls | select |
| </ | </ | ||