Unable to get response time for the suburls in powershell script

Swathi Reddy 186 Reputation points
2021-10-28T18:16:53.937+00:00

I have the below script that needs to check status code and provide response time but I am not getting response time of the suburls

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Rich Matheisen 47,951 Reputation points
    2021-10-28T18:36:47.24+00:00

    It works for me.

    Have you run your script in a debugger and traced the execution and the content of the variables? At what point does a variable not contain an expected value?

    Use the Code Sample editor when you post code!


  2. Limitless Technology 40,046 Reputation points
    2021-11-03T09:17:06.16+00:00

    Hi there,

    You can use the Measure-Command

    The Measure-Command cmdlet runs a script block or cmdlet internally, times the execution of the operation, and returns the execution time.

    https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/measure-command?view=powershell-7.1

    -------------------------------------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept it as an answer--

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.