From the command line, how can I tell if Windows updates are available?

Todd Chester 706 Reputation points
2021-12-27T04:00:22.103+00:00

Hi All,

From the command line, how can I tell if Windows updates are available?

Many thanks,
-T

Windows for business Windows Server User experience Other
0 comments No comments
{count} vote

Accepted answer
  1. Rita Hu -MSFT 9,661 Reputation points
    2021-12-27T08:44:53.96+00:00

    @Todd Chester
    Thanks for your posting on Q&A.

    I found a useful link and I want to share with you. According to this link, we could update computer by PowerShell.
    Run the Install-Module PSWindowsUpdate command to install Module and then run the Get-WindowsUpdate command to get all the available updates.

    Here is a reference screenshot for you:
    160644-2.png

    Note that the link is not from MS, just for your reference.

    Hope the above will be helpful.

    Regards,
    Rita


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


4 additional answers

Sort by: Most helpful
  1. Todd Chester 706 Reputation points
    2021-12-29T10:06:50.447+00:00

    is there a way to do this from CMD (not power shell)?

    1 person found this answer helpful.

  2. Adam J. Marshall 10,281 Reputation points MVP
    2023-02-03T01:16:06.8066667+00:00

    Why cmd batch scripting?

    PowerShell is... Well POWERful.

    You can't do what you are looking for in plain cmd batch scripting.

    PowerShell is also on every version of Windows since Windows Vista.

    1 person found this answer helpful.

  3. Todd Chester 706 Reputation points
    2021-12-30T02:58:17.32+00:00

    Hi RitaHu,

    I am SPECIFICALLY after the command line. This all has to be done "unattended"

    -T


  4. Todd Chester 706 Reputation points
    2023-02-04T01:09:05.5633333+00:00
    
    	
    
    
    
    This was emailed to me, but I can not find it on the web page.  This is the answer I was looking for.  If anyone can find it in the web post, please mark it as the answer.
    
    Thank you AR!
    

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.