PowerShell Remotely Uninstall Software from Multiple Computers

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 24

  • @Teiiiixeira
    @Teiiiixeira Год назад +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  Год назад

      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.
      ruclips.net/video/wJYvortUCxI/видео.html

  • @giuseppeveinsofia4058
    @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?

  • @Wesker83
    @Wesker83 Год назад +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  Год назад

      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.
      ruclips.net/video/wJYvortUCxI/видео.html

  • @Tassshi
    @Tassshi Год назад

    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?

  • @alkeshpatel4404
    @alkeshpatel4404 11 месяцев назад +1

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

    • @SwapnilInfotech
      @SwapnilInfotech  11 месяцев назад

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

  • @sankethkumar7661
    @sankethkumar7661 Год назад

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

  • @AnoopSingh09
    @AnoopSingh09 2 года назад +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  2 года назад

      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 Год назад

      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?

  • @francisgohil8079
    @francisgohil8079 Год назад

    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.

  • @TachiShing
    @TachiShing Год назад +1

    All PCs join the Domain ?

    • @SwapnilInfotech
      @SwapnilInfotech  Год назад

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

  • @satyajit2019
    @satyajit2019 6 месяцев назад

    I want to uninstall all c++
    How?

  • @VikasGupta-xg3uv
    @VikasGupta-xg3uv 2 года назад +1

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

    • @TheDASTHA
      @TheDASTHA 2 года назад

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

    • @SwapnilInfotech
      @SwapnilInfotech  2 года назад

      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) }}

  • @JamesRoyCoronel
    @JamesRoyCoronel 7 месяцев назад

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

    • @SwapnilInfotech
      @SwapnilInfotech  7 месяцев назад

      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.

    • @MuhammadZahid-rt1tb
      @MuhammadZahid-rt1tb 19 дней назад +1

      @@SwapnilInfotech This will be only for servers or including widows 10 based PCs

    • @SwapnilInfotech
      @SwapnilInfotech  19 дней назад

      @MuhammadZahid-rt1tb this script is for windows server as well as guest is. Please let me know if you are facing any problem

  • @himajakoneru7760
    @himajakoneru7760 4 месяца назад

    Could you please post part 2 as well