• How to see CHKDSK results using Powershell

    Home » Forums » AskWoody support » Windows » Windows 10 » Questions: Win10 » How to see CHKDSK results using Powershell

    Author
    Topic
    #2272282

    The CHKDSK results move by in the output window very fast and disappear before I can read everything.

    To see the CHKDSK results in Windows 7, I would use at the PowerShell (admin) Command prompt

    PS C:\Users\Personalfoldername> Get-EventLog -LogName Application -Source wininit | select -Last 1 -ExpandProperty Message

    In Windows 10, the Powershell Command (admin) Prompt says:
    PC C:\Windows\system32> and when I use the Get -EventLog command and the arguments above, it does not work.

    So, how can I use Powershell (admin) in Windows 10 to get the same results that I got in Windows 7?

    Viewing 3 reply threads
    Author
    Replies
    • #2272398

      This works on my W8.1 & W10 systems – don’t need to be admin.

      Get-EventLog -LogName Application -Source chkdsk

      cheers, Paul

      1 user thanked author for this post.
      • #2272520

        Ah, I see that the source is not wininit, but is chkdsk instead. These are the results, using chkdsk.
        Powershell-1

        I have 4 runs of chkdsk recorded in the EventViewer.
        4-runs-in-EventViewer

        Since the EventViewer has 4 runs of chkdsk recorded, the -Last 1 means that I got only the 1st run (on 05/09/2020). If I use 4 as the number, I will get all 4 runs. The last one run on 06/15/2020 10:38:22 AM shows up first in the PS results.

        I have done some reading around and have found another Powershell command that works even better.

        get-winevent -FilterHashTable @{logname=”Application”; id=”xxxxx”}| ?{$_.providername –match “chkdsk”} | fl timecreated, message

        I used “26212” for the id, since I was looking for the run in which I did not use the /f command for chkdsk.

        Here are the results (partial screenshot), which is what I was looking for:
        Powershell-2

        • #2272531

          This works on my W8.1 & W10 systems – don’t need to be admin.

          Get-EventLog -LogName Application -Source chkdsk

          This is what I got when I used the command you suggested — not enough information, though.
          no-piping

      • #2272526

        Get-EventLog -LogName Application -Source chkdsk

        How do you get the grey box for the command?

        • #2272534

          Put < pre > and < /pre > (without the spaces) before and after.

          1 user thanked author for this post.
        • #2272774

          I actually use the back apostrophe (`) either side of the text.

          cheers, Paul

          1 user thanked author for this post.
    • #2272537

      For anyone interested in an alternative method.  Probably works similar in Win 10.

      Win 8.1 after CHKDSK /R.

      Open Event Viewer\Windows Logs\Application.

      Scroll down to the date in question to select Wininit, view all five stages of the scan & corrections.

      Win 8.1 (home & pro) Group B, W10/11 Avoider, Linux Dabbler

      • #2272569

        In the EventViewer, you have only a small frame for scrolling to view the details. But, you can click on EventProperties and then click on the button to put a copy on the clipboard.
        Event-Properties

        I like to view it in PowerShell, though.

        In Windows 10, it’s ‘chkdsk’ not ‘wininit’ and there are 3 stages, not 5 stages:
        Stage 1: Examining basic file system structure (file verification)
        Stage 2: Examining file name linkage (index verification)
        Stage 3: Examining security descriptors (Usn Journal verification)

        1 user thanked author for this post.
    • #2272614

      Well, there are many ways to skin a cat. The posts that I have made above were based on typing CHKDSK in the Start Menu search box and initiating the RUN command by clicking ‘Open’ or ‘Run as Administrator’
      chkdsk-RUN-command

      It turns out that this is the LOooNG way to get the results I wanted (i.e., to NOT have the results disappear from the screen as soon as they appear).

      The short way is to use the Powershell Command chkdsk or chkdsk /f (/f for ‘fix errors’), instead of clicking on ‘Open’ in the RUN command — for the results of that particular run to come up on the screen and not to disappear.

      However, the posts above are useful, particularly if you want to review the results that were produced in earlier runs of CHKDSK or if you want to save logs of the runs.

    • #2272777

      Use “First” instead of “Last”.

      Get-EventLog -LogName Application -Source wininit | select -First 1 -ExpandProperty Message

      cheers, Paul

      1 user thanked author for this post.
      • #2272886

        For Windows 10, the Source has to be chkdsk. wininit doesn’t work.

        no-go-with-wininit

    Viewing 3 reply threads
    Reply To: How to see CHKDSK results using Powershell

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: