Skip to content

Instantly share code, notes, and snippets.

@benwillkommen
Created March 17, 2016 18:35
Show Gist options
  • Save benwillkommen/677c5a98d04f45b59041 to your computer and use it in GitHub Desktop.
Save benwillkommen/677c5a98d04f45b59041 to your computer and use it in GitHub Desktop.
get-pageloadtime.ps1
$ie = new-object -com internetexplorer.application
$ie.visible = $false
$timer = [System.Diagnostics.Stopwatch]::StartNew()
$ie.navigate2("http://example.com")
while($ie.busy){
}
$time = $timer.Elapsed.ToString()
$ie.quit()
add-content c:\example.com.txt ("{0},{1}" -f (get-date -Format G), $time)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment