WMI delay always exactly 10 minutes

Koen Helsen 1 Reputation point
2022-02-16T15:07:50.58+00:00

Hi,

Anyone have an idea why this WMI query always takes exactly 10 minutes, 600 seconds? thx

PS C:\Windows\system32> Get-Date
Get-WmiObject -Query "SELECT * FROM Msft_Volume" -Namespace Root/Microsoft/Windows/Storage >> c:\temp\log.txt
Get-Date

Wednesday, February 16, 2022 3:31:38 PM
Wednesday, February 16, 2022 3:41:38 PM

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,507 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. DaveK 1,851 Reputation points
    2022-02-16T17:18:39.097+00:00

    Some kind of timeout maybe?

    When run on my device its taking TotalMilliseconds : 777.72

    To you get the same if you try

    Measure-Command -Expression {Get-WmiObject -Query "SELECT * FROM Msft_Volume" -Namespace Root/Microsoft/Windows/Storage >> c:\temp\log.txt}
    

  2. Limitless Technology 39,591 Reputation points
    2022-02-22T21:07:30.51+00:00

    Hello @Koen Helsen

    I would recommend to check the output log for any errors. This 600 seconds lead to think about some type of timeout with the WMI connectors, since usually the command should be quite fast (<20secs).

    Other option is to enable verbose by running first:

    Set-PSDebug -Trace 1  
    Get-PSDepth  
    $VerbosePreference="Continue"  
    Get-WmiObject -Query "SELECT * FROM Msft_Volume" -Namespace Root/Microsoft/Windows/Storage >> c:\temp\log.txt  
    

    Hope this helps with your query,

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

    0 comments No comments

Your answer

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