Movatterモバイル変換


[0]ホーム

URL:


Skip to main contentSkip to in-page navigation

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit focus mode

Remove-AppxPackage

    Removes an app package from one or more user accounts.

    Syntax

    RemoveByPackageSet (Default)

    Remove-AppxPackage    [-Package] <String>    [-PreserveApplicationData]    [-WhatIf]    [-Confirm]    [<CommonParameters>]

    RemoveByPackageForRoamingSet

    Remove-AppxPackage    [-Package] <String>    [-PreserveRoamableApplicationData]    [-WhatIf]    [-Confirm]    [<CommonParameters>]

    AllUsersSet

    Remove-AppxPackage    [-Package] <String>    [-AllUsers]    [-WhatIf]    [-Confirm]    [<CommonParameters>]

    UserSet

    Remove-AppxPackage    [-Package] <String>    -User <String>    [-WhatIf]    [-Confirm]    [<CommonParameters>]

    Description

    TheRemove-AppxPackage cmdlet removes an app package from a user account. An app package has an.msix or.appx file extension.

    Examples

    Example 1: Remove an app package

    Remove-AppxPackage -Package 'package1_1.0.0.0_neutral__8wekyb3d8bbwe'

    This command removes an app package namedpackage1_1.0.0.0_neutral__8wekyb3d8bbwe from theaccount of the current user.

    Parameters

    -AllUsers

    This parameter removes the app package for all user accounts on the computer. The parameter worksoff the parent package type. If it's a bundle, usePackageTypeFilter with theGet-AppxPackagecommand and specify the bundle. To use this parameter, you must run the command with administratorpermissions.

    Parameter properties

    Type:SwitchParameter
    Default value:None
    Supports wildcards:False
    DontShow:False

    Parameter sets

    AllUsersSet
    Position:Named
    Mandatory:False
    Value from pipeline:False
    Value from pipeline by property name:False
    Value from remaining arguments:False

    -Confirm

    Prompts you for confirmation before running the cmdlet.

    Parameter properties

    Type:SwitchParameter
    Default value:False
    Supports wildcards:False
    DontShow:False
    Aliases:cf

    Parameter sets

    (All)
    Position:Named
    Mandatory:False
    Value from pipeline:False
    Value from pipeline by property name:False
    Value from remaining arguments:False

    -Package

    Specifies anAppxPackage object or the full name of a package.

    Parameter properties

    Type:String
    Default value:None
    Supports wildcards:False
    DontShow:False

    Parameter sets

    (All)
    Position:0
    Mandatory:True
    Value from pipeline:True
    Value from pipeline by property name:False
    Value from remaining arguments:False

    -PreserveApplicationData

    Specifies that the cmdlet preserves the application data during the package removal. Theapplication data is available for later use. Note that this is only applicable for apps that areunder development so this option can only be specified for apps that are registered from filelayout (Loose file registered).

    Parameter properties

    Type:SwitchParameter
    Default value:None
    Supports wildcards:False
    DontShow:False

    Parameter sets

    RemoveByPackageSet
    Position:Named
    Mandatory:False
    Value from pipeline:False
    Value from pipeline by property name:False
    Value from remaining arguments:False

    -PreserveRoamableApplicationData

    Preserves the roamable portion of the app's data when the package is removed. This parameter isincompatible withPreserveApplicationData.

    Parameter properties

    Type:SwitchParameter
    Default value:None
    Supports wildcards:False
    DontShow:False

    Parameter sets

    RemoveByPackageForRoamingSet
    Position:Named
    Mandatory:False
    Value from pipeline:False
    Value from pipeline by property name:False
    Value from remaining arguments:False

    -User

    If you specify this parameter, the cmdlet removes the app package for only the user that this cmdletspecifies. To remove a package for a user profile other than the profile of the current user, youmust run this command with administrator permissions.

    Note

    This parameter only accepts user SIDs. Use thewhoami /user command to display the currentSID of a user. Seewhoami syntax fordetails.

    Parameter properties

    Type:String
    Default value:None
    Supports wildcards:False
    DontShow:False

    Parameter sets

    UserSet
    Position:Named
    Mandatory:True
    Value from pipeline:False
    Value from pipeline by property name:False
    Value from remaining arguments:False

    -WhatIf

    Shows what would happen if the cmdlet runs. The cmdlet isn't run.

    Parameter properties

    Type:SwitchParameter
    Default value:False
    Supports wildcards:False
    DontShow:False
    Aliases:wi

    Parameter sets

    (All)
    Position:Named
    Mandatory:False
    Value from pipeline:False
    Value from pipeline by property name:False
    Value from remaining arguments:False

    CommonParameters

    This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, seeabout_CommonParameters.

    Inputs

    String

    Microsoft.Windows.Appx.PackageManager.Commands.AppxPackage

    AnAppxPackage object that contain information, including the full name of the app package.

    Outputs

    None

    Related Links


    Feedback

    Was this page helpful?

    YesNo

    In this article

    Was this page helpful?

    YesNo