diff --git a/Test-InternetBandwidth.ps1 b/Test-InternetBandwidth.ps1 index fe515d6..2ca25bf 100644 --- a/Test-InternetBandwidth.ps1 +++ b/Test-InternetBandwidth.ps1 @@ -1,3 +1,4 @@ +. 'C:\Users\dyoder\Documents\Emberkom\Data\Projects\development\management-scripts\Tools.ps1' ## Specify URL to SpeedTest CLI app $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" If ( Test-Path $SPEEDTEST ) { Try { + + LogMsg "Starting internet bandwidth test" $RESULTS = [string]( cmd.exe /c ""${SPEEDTEST} --accept-license --progress=no"" ) ## Cleanup the output @@ -40,12 +43,10 @@ If ( Test-Path $SPEEDTEST ) { $RESULTS = $RESULTS + "`n" } Else { $RESULTS = "The test did not product any output" } LogMsg $RESULTS + LogMsg "Finished internet bandwidth test" } 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}""" } ## Cleanup files and directories created by this script