Patching a remote computer

This topic contains 5 replies, has 3 voices, and was last updated by  Daniel Krebs 4 years ago.

  • Author
  • #16433

    H Man

    Im running this command , and get no error but its not installing the hot fix

    Invoke-Command -ComputerName br123456 -ScriptBlock {
    $arg = " /install C:\hotfixes\Windows6.1-KB2617858-x64.msu /quiet /norestart "
    start-process c:\windows\system32\wusa.exe -argumentlist $arg

    i think these services might have a play in it
    "wscsvc", "CcmExec"

  • #16434

    H Man

    i got it to work with psexec

    psexec \\$target -u "domian\user" -p "p@ssword" -s wusa "\\$target\ADMIN$\Windows6.1-KB2617858-x64.msu" /quiet /norestart

  • #16483


    Try using $args vs $arg


  • #16485

    H Man

    thank you for the info

  • #16499

    Daniel Krebs

    You've encountered a "feature" of the Windows Update installation system related to logon type of a PowerShell Remoting session (Invoke-Command, etc.). The creator of the PowerShell Deployment Toolkit (PDT) found a different workaround which involves scheduled tasks and explains why it does not work in below video from TechEd North America 2014. Watch the complete video or jump in at or before 00:28:57.


    PDT download if you are interested:

  • #16501

    Daniel Krebs

    Last but not least. The CcmExec process is the System Center Configuration Manager (SCCM) client which would be a better solution than using PsExec to install Windows Updates. If you have access to SCCM system or can ask someone to package the updates and deploy them for you.

You must be logged in to reply to this topic.