Skip to content

Progress Bar problems with Remove-AppxPackage #19022

@RobMahn

Description

@RobMahn

Prerequisites

Steps to reproduce

This script will demonstrate the problem by removing and re-installing the Calculator app. (It requires Administrator privileges to be able to re-install the app.)
BugInRemove-AppxPackage.zip

The work-around to re-displaying the progress bar is to run the cmdlet in a new shell. e.g.
$Env:AppxPackageName = $AppxPackage.Name
. (Get-Process -Id $PID).Processname -Command 'Get-AppxPackage $Env:AppxPackageName | Remove-AppPackage'

Expected behavior

The progress bar should honor the ProgressPreference and never re-display after the cmdlet completes.

Actual behavior

Remove-AppxPackage does not honor $ProgressPreference = 'SilentlyContinue'.

Then, the progress bar is re-displayed and remains in view if the command is followed by [System.Console]::ReadKey().

These are probably two seperate bugs, but tied closely together.

Error details

No response

Environment data

The problem exists in V5.1 and V7.3.1

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-AnsweredThe question is answered.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions