Uninstall multiple Software

Welcome Forums General PowerShell Q&A Uninstall multiple Software

This topic contains 5 replies, has 3 voices, and was last updated by

 
Participant
8 months, 1 week ago.

  • Author
    Posts
  • #95469

    Participant
    Points: 0
    Rank: Member

    Hello everyone,
    I'm sorry for poor English.
    I would like to start with Powershell. First I want to explore the possibilities to configure my local computer (Windows 10) with Powershell. I try, in my opinion a simple thing, to uninstall multiple software packages. But it seems it's still not so easy for me.

    I wrote this and I got no error, but it doesn't work. Obviously I don't understand it yet. Can you tell me how it works please? Thank you.

    PS C:\> get-package -name *sapien*
    
    Name                           Version          Source                           ProviderName
    ----                           -------          ------                           ------------
    SAPIEN Document Explorer 2018  3.1.82.0                                          Programs
    SAPIEN PowerShell Studio 2018  5.5.149.0                                         Programs
    SAPIEN ScriptMerge 2018        1.3.74.0                                          Programs
    
    
    PS C:\> get-package -name *sapien* | uninstall-package
    PS C:\> get-package -name *sapien*
    
    Name                           Version          Source                           ProviderName
    ----                           -------          ------                           ------------
    SAPIEN Document Explorer 2018  3.1.82.0                                          Programs
    SAPIEN PowerShell Studio 2018  5.5.149.0                                         Programs
    SAPIEN ScriptMerge 2018        1.3.74.0                                          Programs
    
    
    PS C:\>
    
  • #95472

    Keymaster
    Points: 1,624
    Helping HandTeam Member
    Rank: Community Hero

    The docs actually have the clue, I think. If you look at https://docs.microsoft.com/en-us/powershell/module/packagemanagement/get-package?view=powershell-6, you'll see where it says, "Returns a list of all software packages that have been installed by using Package Management."

    If the package wasn't installed by Install-Package, then Uninstall-Package can't usually remove it.

  • #95475

    Participant
    Points: 0
    Rank: Member

    I see now. It means, software which I installed by "double click" have to uninstall by "Programs and Features"?

  • #95478

    Keymaster
    Points: 1,624
    Helping HandTeam Member
    Rank: Community Hero

    Or by manually running their uninstaller, if they have one. For some programs, you can also use Win32_Product, which return instances having an Uninstall() method.

  • #95481

    Participant
    Points: 0
    Rank: Member

    Ah, ok. Thanks. I will tinker something. By the way, your YouTube videos aroused my interest to play with Powershell. You're a funny guy. 😉

  • #95544

    Participant
    Points: 9
    Rank: Member

    I think I initially replied to the wrong post.

The topic ‘Uninstall multiple Software’ is closed to new replies.