PS | Look for alternative way to remove UUP Apps from Store

Discussion in 'Scripting' started by Dark Monkey, Oct 1, 2021.

  1. Dark Monkey

    Dark Monkey MDL Addicted

    Feb 2, 2011
    683
    836
    30
    Me And PS -- not work so well.
    currently I use this command to remove app from Store.
    Code:
    powershell -noprofile -executionpolicy bypass -command "Get-AppxPackage *OneDrive* -AllUsers| Remove-AppPackage -AllUsers"
    I am looking for -- Get-AppxPackage Version with search by Name == Or packageName == Or Name Contain XXX
    any one know alternative way ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. (\_/)^(\_/)

    (\_/)^(\_/) MDL Member

    May 31, 2020
    1,754
    1,486
    60
    First of All Cross Check :
    "Remove-AppxPackage" but not "Remove-AppPackage"

    Secondly i dont know if this pwsh method will work to Uninstall Ondrive from Current Running Online OS as it wont in any of my scenarios.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Dark Monkey

    Dark Monkey MDL Addicted

    Feb 2, 2011
    683
    836
    30
    OneDrive .. Just an example
    can be anything i want
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    13,119
    64,195
    340
    Code:
    Get-AppXPackage -Name "*Microsoft.Office.Desktop*" | Foreach {Remove-AppxPackage $_.PackageFullName}
    
    Get-AppxPackage | % {if (!($_.IsFramework -or $_.PublisherId -eq "cw5n1h2txyewy" -or $_.Name -eq "Microsoft.Reader" -or $_.Name -eq "Microsoft.WindowsCalculator" -or $_.Name -eq "Microsoft.WindowsStore")) {$_}} | Remove-AppxPackage
    
    (Get-AppxPackage | Where-Object {$_.PublisherId -ne "cw5n1h2txyewy"}).PackageFullName | Remove-AppxPackage
    
    (Get-AppxPackage -AllUsers).PackageFullName | sort
    
    (Get-AppxPackage | % {if (!($_.IsFramework -or $_.PublisherId -eq "cw5n1h2txyewy")) {$_}}).PackageFullName
    
    (Get-AppxPackage -AllUsers -PackageType bundle).PackageFullName
    
    Get-AppxPackage -AllUser | Where PublisherId -ne cw5n1h2txyewy | Format-List -Property PackageFullName,PackageUserInformation
    
    Get-AppxPackage -PackageTypeFilter Main | ? { $_.SignatureKind -eq "System" } | Sort Name | Format-Table Name, InstallLocation
    
    (Get-AppXPackage -Name "MicrosoftWindows.Client.CBS").Version
     
  5. Dark Monkey

    Dark Monkey MDL Addicted

    Feb 2, 2011
    683
    836
    30
    with little modification after abbodi1406 suggestions, this work better than my first try
    Code:
    Get-AppxPackage -Name *%%#* -AllUsers | Foreach {Remove-AppxPackage $_.PackageFullName -AllUsers}
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...