The code for history1.txt is: Id Duration CommandLine -- -------- ----------- 1 0.003 foreach ($a in $array) {… 2 0.001 $array = 1..10 3 0.033 foreach ($a in $array) {… 4 0.014 $sum = 0 5 0.020 foreach ($a in $array) {… 6 0.011 Write-Output "The sum of `$array is $sum." 7 0.049 Get-ChildItem | ForEach-Object {$_.name} 8 0.083 Get-ChildItem | gm 9 0.117 Get-ChildItem | ForEach-Object {… 10 0.052 Get-ChildItem -Path ~\Documents\CST1861\Week | ForEach-Object {… 11 0.049 Get-ChildItem -Path ~\Documents\CST1861\Week\14 | ForEach-Object {… 12 0.028 Get-ChildItem -Path ~\Documents\CST1861\Week\14 | ForEach-Object {… 13 0.031 Get-ChildItem -Path ~\Documents\CST1861\Week\14 | ForEach-Object {… 14 0.036 Get-ChildItem -Path ~\Documents\CST1861\Week\14 | ForEach-Object {… 15 0.023 Get-ChildItem -Path ~\Documents\CST1861\Week\14 | ForEach-Object {… 16 0.037 $array | ForEach-Object {… 17 0.061 ls 18 0.024 Get-ChildItem 19 0.027 dir 20 10.095 1..5 | ForEach-Object {Write-Output $_; start-sleep -Seconds 2} 21 0.182 Measure-Command 1..5 | ForEach-Object {Write-Output $_; start-sleep -Seconds 2} 22 10.103 Measure-Command {1..5 | ForEach-Object {Write-Output $_; start-sleep -Seconds 2}} 23 2.163 Measure-Command {1..5 | ForEach-Object -Parallel {Write-Output $_; start-sleep -Seconds 2}} 24 4.233 Measure-Command {1..10 | ForEach-Object -Parallel {Write-Output $_; start-sleep -Seconds 2}} 25 0.013 $n=1 26 0.026 While ($n -le 10){… 27 0.001 $n=1 28 0.017 While ($n -le 10){… 29 0.009 While ($n -le 10){Write-Output $n $n++ } 30 0.001 $n=1 31 0.023 While ($n -le 10){Write-Output $n; $n++ } 32 0.011 While ($n -le 10){Write-Output $n; $n++ } 33 0.010 $n 34 0.009 $n=5 35 0.004 While ($n -le 10){Write-Output $n; $n++ } 36 0.017 $date = get-date 37 0.021 do {… 38 0.018 $date 39 0.001 $date = get-date 40 0.005 $date 41 0.001 $date = get-date 42 0.013 $date = $date.AddMonths(1) 43 0.013 $date 44 0.013 do {… 45 0.001 $n=1 46 0.000 do {… 47 0.001 $n=1 48 0.017 do {… 49 0.001 $n 50 0.001 While ($n -le 10){Write-Output $n; $n++ } 51 0.001 do {… 52 0.001 $n 53 0.043 $items = Get-ChildItem -Path ~\Documents\CST1861\Week\13= 54 0.010 $items = Get-ChildItem -Path ~\Documents\CST1861\Week\13 55 0.026 foreach ($i in $items){Write-Output "The character length of $i is "($i).Length} 56 0.017 $Process = "notepad" 57 0.055 do {…