Powershell - Script to test intranet/sharepoint site load times RRS feed

  • Question

  • Hi,

    I am trying to test how long it takes to load a couple of intranet sites, including sharepoint using the below code

    Script reads URLs from a text file and tests each one. This is working fine and giving me results.

    Issue i'm having is that invoke-webrequest is only testing the HTML load time, no images or javascript or any other content on the sites, so it's not giving a true representation of how long each site is taking to load.

    Is there any way I can measure whole page load time including images with with invoke-webrequest?


    $URLListFile = "C:\scripts\urllist.txt" 
    $URLList = Get-Content $URLListFile -ErrorAction SilentlyContinue
      $Result = @()
      Foreach($Uri in $URLList) {
      $time = try{
      $request = $null
       ## Request the URI, and measure how long the response took.
      $result1 = Measure-Command { $request = Invoke-WebRequest -Uri $uri -usedefaultcredentials}

    Thursday, January 16, 2014 10:06 PM


All replies