Created
March 17, 2016 18:35
-
-
Save benwillkommen/677c5a98d04f45b59041 to your computer and use it in GitHub Desktop.
get-pageloadtime.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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