Edit

Share via


Set-AppxDefaultVolume

Specifies a default appx volume.

Syntax

Default (Default)

Set-AppxDefaultVolume
    [-Volume] <AppxVolume>
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Set-AppxDefaultVolume cmdlet specifies a default AppxVolume. The default AppxVolume is the default target for all deployment operations on the computer. Deployment operations can specify a different non-default target volume.

Examples

Example 1: Set a default volume by using a path

Set-AppxDefaultVolume -Volume F:\

This command sets the default volume to be the volume F:\.

Example 2: Set a default volume by using an ID

Set-AppxDefaultVolume -Volume {ef23c8d6-b13c-4c4c-ae3b-7d5a162de9b9}

This command sets the default volume to be the one that has the specified media ID.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
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

-Volume

Specifies the path a volume. This cmdlet sets the volume that this parameter specifies to be the default deployment target for the computer.

Parameter properties

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

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
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:None
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, see about_CommonParameters.