Set-AppxPackageAutoUpdateSettings

Configures a specific Windows App's Auto Update and Repair settings.

Syntax

Set-AppxPackageAutoUpdateSettings
   [-PackageFamilyName] <String>
   -AppInstallerUri <String>
   [-UpdateUris <String[]>]
   [-RepairUris <String[]>]
   [-OptionalPackages <String[]>]
   [-DependencyPackages <String[]>]
   [-EnableAutomaticBackgroundTask]
   [-ForceUpdateFromAnyVersion]
   [-DisableAutoRepairs]
   [-CheckOnLaunch]
   [-ShowPrompt]
   [-UpdateBlocksActivation]
   [-UseSystemPolicySource]
   [-HoursBetweenUpdateChecks <UInt32>]
   [-Version <String>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AppxPackageAutoUpdateSettings
   [-PackageFamilyName] <String>
   [-PauseUpdates]
   [-UseSystemPolicySource]
   -HoursToPause <UInt32>
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-AppxPackageAutoUpdateSettings cmdlet provides access to configure a specific Windows App's Auto Update and Repair setings.

Examples

Example 1: Update the Auto Update settings for an App

$params = @{
    AppInstallerUri           =  'https://website.com/PackageName.appinstaller '
    PackageFamilyName         =  'PackageName_8h66172c634n0 '
    CheckOnLaunch             =  $true
    ForceUpdateFromAnyVersion =  $true
    HoursBetweenUpdateChecks  =  2 
    ShowPrompt                =  $true
    UpdateUris                =  'file://ComputerName/Share/PackageName_x64.appinstaller'
}
Set-AppxPackageAutoUpdateSettings @params

This cmdlet will update the Auto Update settings of the PackageName_8h66172c634n0 Windows App to target an AppInstaller file on a network accessible file share every two hours, displaying a prompt to the user. Allowing for the Windows App to update to any version (higher or lower) despite the version of the installed Windows App.

Example 2: Disable the Auto Repair setting for an App

$params = @{
    AppInstallerUri    = 'https://website.com/PackageName.appinstaller'
    PackageFamilyName  = 'PackageName_8h66172c634n0'
    DisableAutoRepairs = $true
}
Set-AppxPackageAutoUpdateSettings @params

This cmdlet will disable the automatic repair of the Windows App.

Example 3: Pause Updates on a specific Windows App

$params = @{
    HoursToPause      = 4320
    PackageFamilyName = 'PackageName_8h66172c634n0'
    PauseUpdates      = $true
}
Set-AppxPackageAutoUpdateSettings @params

This cmdlet will pause the Windows App from checking for App updates for 4320 hours (180 Days).

Parameters

-AppInstallerUri

Specifies the location of the AppInstaller file targeted by this Windows App.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-CheckOnLaunch

Specifies that the Windows App will check for new updates when the App is launched.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DependencyPackages

Specifies any Dependency Packages being used by the Windows App.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisableAutoRepairs

Turns off the automatic repair of a broken Windows App.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EnableAutomaticBackgroundTask

Specifies that the automation of updating and repairing will occur as a background task.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ForceUpdateFromAnyVersion

Specifies that the next update of the Windows App can be of a higher or lower version.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HoursBetweenUpdateChecks

Specifies the time between update checks allowed for a specific Windows App.

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HoursToPause

Specifies the duration of time in hours that the Windows App won't check for updates.

Type:UInt32
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-OptionalPackages

Specifies the Optional Packages being used by the Windows App.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PackageFamilyName

Specifies the Package Family Name of the Windows App which is being modified.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-PauseUpdates

Specifies if the Windows App updates are to be paused.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RepairUris

Specifies the location which will be sourced from when repairing the Windows App.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ShowPrompt

Specifies that if any action is occurring for the Windows App, a prompt will be displayed.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-UpdateBlocksActivation

Specifies that if an update is available for a Windows App, the App will prevent launching until the update has been installed.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-UpdateUris

Specifies the location which will be sourced from when updating the Windows App.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-UseSystemPolicySource

Specifies that an override can be applied to the Developer configured settings.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Version

Specifies the version of the Update Settings being applied.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Outputs

Object