added logging messages for clarity
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
. 'C:\Users\dyoder\Documents\Emberkom\Data\Projects\development\management-scripts\Tools.ps1'
|
||||||
## Specify URL to SpeedTest CLI app
|
## Specify URL to SpeedTest CLI app
|
||||||
$URL = 'https://install.speedtest.net/app/cli/ookla-speedtest-1.0.0-win64.zip'
|
$URL = 'https://install.speedtest.net/app/cli/ookla-speedtest-1.0.0-win64.zip'
|
||||||
|
|
||||||
@@ -26,6 +27,8 @@ Catch { LogErr $_.Exception.Message }
|
|||||||
$SPEEDTEST = "${WORKINGDIR}\speedtest.exe"
|
$SPEEDTEST = "${WORKINGDIR}\speedtest.exe"
|
||||||
If ( Test-Path $SPEEDTEST ) {
|
If ( Test-Path $SPEEDTEST ) {
|
||||||
Try {
|
Try {
|
||||||
|
|
||||||
|
LogMsg "Starting internet bandwidth test"
|
||||||
$RESULTS = [string]( cmd.exe /c ""${SPEEDTEST} --accept-license --progress=no"" )
|
$RESULTS = [string]( cmd.exe /c ""${SPEEDTEST} --accept-license --progress=no"" )
|
||||||
|
|
||||||
## Cleanup the output
|
## Cleanup the output
|
||||||
@@ -40,12 +43,10 @@ If ( Test-Path $SPEEDTEST ) {
|
|||||||
$RESULTS = $RESULTS + "`n"
|
$RESULTS = $RESULTS + "`n"
|
||||||
} Else { $RESULTS = "The test did not product any output" }
|
} Else { $RESULTS = "The test did not product any output" }
|
||||||
LogMsg $RESULTS
|
LogMsg $RESULTS
|
||||||
|
LogMsg "Finished internet bandwidth test"
|
||||||
}
|
}
|
||||||
Catch { LogErr $_.Exception.Message }
|
Catch { LogErr $_.Exception.Message }
|
||||||
|
|
||||||
## Wait 5 seconds before continuing so the test has a chance to start before it gets deleted
|
|
||||||
Start-Sleep -Seconds 5
|
|
||||||
|
|
||||||
} Else { LogMsg "The file does not exist at the expected path: ""${SPEEDTEST}""" }
|
} Else { LogMsg "The file does not exist at the expected path: ""${SPEEDTEST}""" }
|
||||||
|
|
||||||
## Cleanup files and directories created by this script
|
## Cleanup files and directories created by this script
|
||||||
|
|||||||
Reference in New Issue
Block a user