PowerShell Remotely Uninstall Software from Multiple Computers

Sdílet
Vložit
  • čas přidán 26. 08. 2024

Komentáře • 22

  • @himajakoneru7760
    @himajakoneru7760 Před 2 měsíci

    Could you please post part 2 as well

  • @giuseppeveinsofia4058

    Hi i try it but it doesn't work. in display i have not error message and if use verbose it reply to me "unistall completed" ...can you help me?

  • @Tassshi
    @Tassshi Před rokem

    Will this script works only on servers or computers or Both? Is there any way to provide AD group as (all staff) within our AD in domain controller instead of hostname?

  • @satyajit2019
    @satyajit2019 Před 4 měsíci

    I want to uninstall all c++
    How?

  • @Teiiiixeira
    @Teiiiixeira Před rokem +1

    Hello friend, how are you?
    I had two problems:
    1 - For me to connect to the machine, the WinRM service should be enabled on the user's machine; I enabled the service and was able to reach her.
    2 - I'm trying to uninstall WinRar, but the script doesn't find the package to uninstall. When testing with Adobe Acrobat, Java, it works perfectly, but with WinRar not. I put the script like this:
    $Servers = Get-content "C:\Scripts\livePCs.txt"
    Foreach ($Server in $Servers){
    Invoke-Command -ComputerName $Server -Credential $cred -ScriptBlock {
    (Get-Package -Name "WinRAR*" | Uninstall-Package -ErrorAction SilentlyContinue)
    }}
    Can you help me?
    Thanks

    • @SwapnilInfotech
      @SwapnilInfotech  Před rokem

      Kindly watch below video to uninstall WinRAR software from remote computer silently and let me know if you are facing any issue. Get-Package have some limitation hence it wont detect software installed through EXE file.
      czcams.com/video/wJYvortUCxI/video.html

  • @francisgohil8079
    @francisgohil8079 Před rokem

    How can i run this script in Ubuntu machine remotely can you please share video on Ubuntu as well, we have 200+ machines and right now doing manual login and uninstall which is time consuming. so looking for script to run on multiple computers running windows and ubuntu.

  • @sankethkumar7661
    @sankethkumar7661 Před rokem

    HI I want to uninstall Google Chrome on Multiple computers, can you help me with the required script

  • @Wesker83
    @Wesker83 Před rokem +1

    What if I don't see the program I want to remove? f. ex. I can't see Foxit Reader uninstaller. I type: Foxit Reader, Foxit Software*, Foxit*, *Foxit* etc. Is there any different way to uninstall Foxit?

    • @SwapnilInfotech
      @SwapnilInfotech  Před rokem

      If you don't see the program you want to remove then either you have to use the default uninstaller for it as mentioned in the video below or find another way to do it. Please check the video below and let me know if this helps for Foxit or else let me know so I'll work on Foxit as well.
      czcams.com/video/wJYvortUCxI/video.html

  • @alkeshpatel4404
    @alkeshpatel4404 Před 9 měsíci +1

    This work for only one users profile in specific workstation. not for all users

    • @SwapnilInfotech
      @SwapnilInfotech  Před 9 měsíci

      Thank you for notifying to us, I’ll check on this and let you know.

  • @JamesRoyCoronel
    @JamesRoyCoronel Před 5 měsíci

    hi sir, can you explain this command here please ?? foreach ($Server in $Servers)

    • @SwapnilInfotech
      @SwapnilInfotech  Před 5 měsíci

      When you use foreach command, it run entire script one by one on computers given it servers list. So first part variable is single entry taken from second variable which has multiple entry for server name. So we are asking foreach command to pick first computer name run the complete script and then pick second computer name and run complete script till it reaches last computer names.

  • @AnoopSingh09
    @AnoopSingh09 Před 2 lety +1

    I have to use such script on 700 computers for a specific program but issue with i need to add admin credentials. can you plz help me on that ?.

    • @SwapnilInfotech
      @SwapnilInfotech  Před rokem

      You can use below script to perform the task. I have only added new veriable for password and that i user afer invoke command. Please let me know if you have any query on this.
      $Servers = Get-content "C:\Scripts\livePCs.txt"
      $cred = get-credential
      Foreach ($Server in $Servers){
      Invoke-Command -ComputerName $Server -Credential $cred -ScriptBlock {
      (Get-Package -Name "adobe acrobat reader*" | Uninstall-Package -ErrorAction SilentlyContinue) ,
      (Get-Package -Name "7-Zip*" | Uninstall-Package -ErrorAction SilentlyContinue) }}

    • @Tassshi
      @Tassshi Před rokem

      Hi Anoop, I have almost a same situation, while uninstalling it requires user to key in admin credentials to remove the programme. Kindly let me know if you have followed this script and if worked or could you suggest me any other thing which you may have carried out?

  • @user-iq6ww6kj4i
    @user-iq6ww6kj4i Před rokem +1

    All PCs join the Domain ?

    • @SwapnilInfotech
      @SwapnilInfotech  Před rokem

      Yes all PCs are part of domain and script is run under domain admin account which have admin access on all the computers.

  • @VikasGupta-xg3uv
    @VikasGupta-xg3uv Před 2 lety +1

    while uninstalling it requires a password how can I integrate that password within this script

    • @TheDASTHA
      @TheDASTHA Před rokem

      You can mention the server read credentials so that while script running it will ask password at the time.

    • @SwapnilInfotech
      @SwapnilInfotech  Před rokem

      You can use below script to perform the task. I have only added new variable for password and that I use after invoke command. Please let me know if you have any query on this.
      $Servers = Get-content "C:\Scripts\livePCs.txt"
      $cred = get-credential
      Foreach ($Server in $Servers){
      Invoke-Command -ComputerName $Server -Credential $cred -ScriptBlock {
      (Get-Package -Name "adobe acrobat reader*" | Uninstall-Package -ErrorAction SilentlyContinue) ,
      (Get-Package -Name "7-Zip*" | Uninstall-Package -ErrorAction SilentlyContinue) }}