none
Query windows update settings using powershell RRS feed

  • Question

  • Would like to find out how to run the "Invoke" command to query "Windows update status" on the remote machine running Windows Server 2016, 2008, 2012

    Currently using the following and am getting results on local machine although the script does not work when used remotely with the Invoke command

    Invoke-Command -ComputerName testpc1
    $WindowsUpdates = New-Object -ComObject "Microsoft.Update.AutoUpdate"
    $WindowsUpdates.Settings 

    Any help is kindly appreciated, thanks 
    • Moved by Bill_Stewart Wednesday, September 4, 2019 9:05 PM This is not "scripts on demand"
    Thursday, April 11, 2019 3:01 AM

All replies

  • Invoke-commad requires a script block.

    Always check help first.  All trained techs knw that help is the first stop.

    help invoke-command -online

    Read ALL of the help and it will explain how to use this command.


    \_(ツ)_/

    Thursday, April 11, 2019 3:36 AM