Last active
July 12, 2019 01:49
-
-
Save mkht/42e20df8dc86e0c19eb11f2425e68ca3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# ======================================================= | |
ストアアプリ再登録スクリプト 2019/07/12 | |
for Windows 10 64bit Version 1809 | |
======================================================= #> | |
$ErrorActionPreference = 'Continue' | |
$ProgressPreference = 'SilentlyContinue' | |
# Get all apps list | |
$Apps = Get-AppxPackage -ErrorAction Stop | |
# 電卓 | |
if ($Apps.Name -notcontains 'Microsoft.WindowsCalculator') { | |
if ($manifest = (Get-ChildItem -Path 'C:\Program Files\WindowsApps\Microsoft.WindowsCalculator_*_x64__8wekyb3d8bbwe\AppxManifest.xml' | Select-Object -First 1).FullName) { } | |
else { $manifest = 'C:\Program Files\WindowsApps\Microsoft.WindowsCalculator_10.1805.1201.0_x64__8wekyb3d8bbwe\AppxManifest.xml' } | |
Add-AppxPackage -Register $manifest -DisableDevelopmentMode | |
} | |
# Groove ミュージック | |
if ($Apps.Name -notcontains 'Microsoft.ZuneMusic') { | |
if ($manifest = (Get-ChildItem -Path 'C:\Program Files\WindowsApps\Microsoft.ZuneMusic_*_x64__8wekyb3d8bbwe\AppxManifest.xml' | Select-Object -First 1).FullName) { } | |
else { $manifest = 'C:\Program Files\WindowsApps\Microsoft.ZuneMusic_10.18052.20211.0_x64__8wekyb3d8bbwe\AppxManifest.xml' } | |
Add-AppxPackage -Register $manifest -DisableDevelopmentMode | |
} | |
# 映画 & テレビ | |
if ($Apps.Name -notcontains 'Microsoft.ZuneVideo') { | |
if ($manifest = (Get-ChildItem -Path 'C:\Program Files\WindowsApps\Microsoft.ZuneVideo_*_x64__8wekyb3d8bbwe\AppxManifest.xml' | Select-Object -First 1).FullName) { } | |
else { $manifest = 'C:\Program Files\WindowsApps\Microsoft.ZuneVideo_10.18052.20211.0_x64__8wekyb3d8bbwe\AppxManifest.xml' } | |
Add-AppxPackage -Register $manifest -DisableDevelopmentMode | |
} | |
# 切り取り領域とスケッチ | |
if ($Apps.Name -notcontains 'Microsoft.ScreenSketch') { | |
if ($manifest = (Get-ChildItem -Path 'C:\Program Files\WindowsApps\Microsoft.ScreenSketch_*_x64__8wekyb3d8bbwe\AppxManifest.xml' | Select-Object -First 1).FullName) { } | |
else { $manifest = 'C:\Program Files\WindowsApps\Microsoft.ScreenSketch_10.1806.2112.0_x64__8wekyb3d8bbwe\AppxManifest.xml' } | |
Add-AppxPackage -Register $manifest -DisableDevelopmentMode | |
} | |
# ペイント 3D | |
if ($Apps.Name -notcontains 'Microsoft.MSPaint') { | |
if ($manifest = (Get-ChildItem -Path 'C:\Program Files\WindowsApps\Microsoft.MSPaint_*_x64__8wekyb3d8bbwe\AppxManifest.xml' | Select-Object -First 1).FullName) { } | |
else { $manifest = 'C:\Program Files\WindowsApps\Microsoft.MSPaint_4.1807.12027.0_x64__8wekyb3d8bbwe\AppxManifest.xml' } | |
Add-AppxPackage -Register $manifest -DisableDevelopmentMode | |
} | |
# 接続 | |
if ($Apps.Name -notcontains 'Microsoft.PPIProjection') { | |
Add-AppxPackage -Register 'C:\Windows\SystemApps\Microsoft.PPIProjection_cw5n1h2txyewy\AppxManifest.xml' -DisableDevelopmentMode | |
} | |
# Windows セキュリティ | |
if ($Apps.Name -notcontains 'Microsoft.Windows.SecHealthUI') { | |
Add-AppxPackage -Register 'C:\Windows\SystemApps\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy\AppxManifest.xml' -DisableDevelopmentMode | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment