Installing a KB from a remote computer to localhost

Welcome Forums General PowerShell Q&A Installing a KB from a remote computer to localhost

Viewing 4 reply threads
  • Author
    Posts
    • #193036
      Inactive
      Topics: 8
      Replies: 13
      Points: 0
      Rank: Member

      Hi everyone, Thanks for stopping by 🙂

       

      I’m having some difficulties to install a KB that it situated on a remote computer to the localhost.

      Here is what I launch on the localhost:

      if ($global:windows7 -eq “true”){
      $kbcheck = systeminfo.exe | findstr kb2852386
      $kbcheck
      if (!$kbcheck) {get-hotfix -id kb2852386 -computername “\\path to the folder where the kb is stored\CleanMgr_KB2852386”}
      }
      
      

       

       

      I’me pretty sure I’m not doing what I’m supposed to do right there, but I’m having a lot of trouble finding how installing through get-hotfix is supposed to work

    • #193051
      Participant
      Topics: 5
      Replies: 2411
      Points: 6,193
      Helping Hand
      Rank: Community MVP

      The parameter -ComputerName takes one or more computer names. Did you read the help for Get-HotFix? I’m afraid it does not do what you expect it to do. It lists the installed hotfixes on the local or one or more remote computers. You should read the complete help including the examples to learn how to use it.

    • #193060
      Inactive
      Topics: 8
      Replies: 13
      Points: 0
      Rank: Member

      That’s what i was thinking yeah. i read it but i couldn’t find an installation part, so yeah, it doesn’t install anything.

      Back to the drawing board then. thank you.

    • #193066
      Participant
      Topics: 5
      Replies: 2411
      Points: 6,193
      Helping Hand
      Rank: Community MVP

      … so yeah, it doesn’t install anything.

      Why would you actually expect to get something installed when the cmdlet starts with “Get”? I’d expect this behaviour only when the cmdlet starts with “Install” or “Add” or “Invoke” or “Push” or “Publish” or “Set” … but not with “Get”. 😉

    • #193189
      Senior Moderator
      Topics: 5
      Replies: 133
      Points: 706
      Helping Hand
      Rank: Major Contributor

      Remote deployment is a never-ending headache on Windows. You will probably not be able to install the KB on a remote system while keeping the file on the local system, but you should be able to copy the KB to the remote machine and then remotely execute the installation via PowerShell. Here are two examples:
      https://community.spiceworks.com/topic/2054098-silently-install-patches-remotely-and-reboot
      https://community.spiceworks.com/topic/1645987-how-to-remotely-install-a-msi-file-with-psexec-msiexec

Viewing 4 reply threads
  • The topic ‘Installing a KB from a remote computer to localhost’ is closed to new replies.