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

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

  1. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    3,761
    5,228
    120
    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. 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.
     
  3. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    3,761
    5,228
    120
    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
    16,226
    84,919
    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 Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    3,761
    5,228
    120
    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...