Tools.ps1: move all processes into functions and explicitly declare global variables

Test-InternetBandwidth.ps1: output to console instead of file
Uninstall-NCentralComponents.ps1: minor updates
This commit is contained in:
2021-08-05 09:42:15 -04:00
parent 2c257b6fed
commit 96e2af2dda
3 changed files with 59 additions and 29 deletions
+5 -4
View File
@@ -31,13 +31,14 @@ Catch { LogErr $_.Exception.Message }
## Run the SpeedTest CLI app
$SPEEDTEST = "${WORKINGDIR}\speedtest.exe"
If ( Test-Path $SPEEDTEST ) {
Try { Start-Process $SPEEDTEST -ArgumentList "--progress=no --selection-details --output-header --format=csv" -PassThru -Wait -RedirectStandardOutput $OUTPUT }
#Try { Start-Process $SPEEDTEST -ArgumentList "--progress=no --selection-details --output-header --format=csv" -PassThru -Wait -RedirectStandardOutput $OUTPUT }
Try {
$RESULTS = (cmd.exe /c "${SPEEDTEST} --progress=no")
LogMsg $RESULTS
}
Catch { LogErr $_.Exception.Message }
} Else { LogMsg "The file does not exist at the expected path: ""${SPEEDTEST}""" }
## Process the results
## Cleanup files and directories created by this script
If ( Test-Path $ZIPFILE ) {
LogMsg "Deleting downloaded zip file: ""$ZIPFILE"""