You could use the PowerShell scripts found in the article
Reprovision Windows 10 Apps… Wait, What?
The article says this :
The gist of it is, when an app is deprovisioned a registry key will be made. If that registry key is present then the app will not be reinstalled on any Windows 10 Feature Update that is 1803 or above.
The article contains two PowerShell functions for listing
deprovisioned apps and reprovisioning apps.
Once these functions are created, this command will do the job:
Get-DeprovisionedAppX -Filter 'Store' | Reprovision-AppX
In case the article will disappear in the future, here are the
two functions:
Get-DeprovisionedAppX
function Get-DeprovisionedAppX {
#
.SYNOPSIS
Returns an array of apps that are deprovisioned
.DESCRIPTION
This function returns an array of all the apps that are deprovisioned on the local computer.
Deprovisioned apps will show up in the registry if they were removed while Windows was offline, or
with the PowerShell cmdlets for removing AppX Packages.
.PARAMETER Filter
Option filter that will be ran through as a '-match' so that regex can be used
Accepts an array of strings, which can be a regex string if you wish
.EXAMPLE
PS C:\> Get-DeprovisionedAppX
Return all deprovisioned apps on the local computers
.EXAMPLE
PS C:\> Get-DeprovisionedAppX -Filter Store
Return all deprovisioned apps on the local computers that match the filter 'Store'
#>
param (
[parameter(Mandatory = $false)]
[string[]]$Filter
)
begin {
$DeprovisionRoot = "registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned"
$AllDeprovisionedApps = Get-ChildItem -Path $DeprovisionRoot | Select-Object -Property @{ Name = 'DeprovisionedApp'; Expression = { $_.PSChildName } }
if ($null -eq $AllDeprovisionedApps) {
Write-Warning "There are no deprovisioned apps"
}
}
process {
switch ($PSBoundParameters.ContainsKey('Filter')) {
$true {
foreach ($SearchString in $Filter) {
switch -regex ($AllDeprovisionedApps.DeprovisionedApp) {
$SearchString {
[PSCustomObject]@{
'DeprovisionedApp' = $PSItem
}
}
default {
Write-Verbose "$PSItem does not match the filter `'$SearchString`""
}
}
}
}
$false {
Write-Output $AllDeprovisionedApps
}
}
}
}
Reprovision-AppX
function Reprovision-AppX {
#
.SYNOPSIS
'Reprovision' apps by removing the registry key that prevents app reinstall
.DESCRIPTION
Starting in Windows 10 1803, a registry key is set for every deprovisioned app. As long as this registry key
is in place, a deprovisioned application will not be reinstalled during a feature update. By removing these
registry keys, we can ensure that deprovisioned apps, such as the windows store are able to be reinstalled.
.PARAMETER DeprovisionedApp
The full name of the app to reprovision, as it appears in the registry. You can easily get this name using
the Get-DeprovisionedApp function.
.EXAMPLE
PS C:\> Reprovision-AppX -DeprovisionedApp 'Microsoft.WindowsAlarms_8wekyb3d8bbwe'
Removes the registry key for the deprovisioned WindowsAlarms app. The app will return after the next
feature update.
.INPUTS
[string[]]
.NOTES
You must provide the exact name of the app as it appears in the registry. This is the full app 'name' - It is
recommended to first use the Get-DeprovisionApp function to find apps that can be reprovisioned.
#>
[CmdletBinding(SupportsShouldProcess)]
param(
[parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
[string[]]$DeprovisionedApp
)
begin {
$DeprovisionRoot = "registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned"
$AllDeprovisionedApps = Get-ChildItem -Path $DeprovisionRoot
if ($null -eq $AllDeprovisionedApps) {
Write-Warning "There are no deprovisioned apps"
}
}
process {
foreach ($App in $DeprovisionedApp) {
$DeprovisionedAppPath = Join-Path -Path $DeprovisionRoot -ChildPath $App
if ($PSCmdlet.ShouldProcess($App, "Reprovision-App")) {
$AppPath = Resolve-Path -Path $DeprovisionedAppPath -ErrorAction Ignore
if ($null -ne $AppPath) {
Remove-Item -Path $AppPath.Path -Force
}
else {
Write-Warning "App $App was not found to be deprovisioned"
}
}
}
}
}