From 56d424df860289f8215e5ecb0d80753a13bdc9a1 Mon Sep 17 00:00:00 2001 From: Richard Newton Date: Wed, 21 Feb 2018 13:31:23 -0800 Subject: [PATCH] Added error handling parameter on line 16 I added error handling on line 16; -ErrorAction SilentlyContinue in order to suppress any details in the MDT logs. --- Windows10SilentDebloater.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Windows10SilentDebloater.ps1 b/Windows10SilentDebloater.ps1 index 33987a6..3a16483 100644 --- a/Windows10SilentDebloater.ps1 +++ b/Windows10SilentDebloater.ps1 @@ -13,7 +13,7 @@ Function Begin-SysPrep { param([switch]$SysPrep) - get-appxpackage | remove-appxpackage + get-appxpackage | remove-appxpackage -ErrorAction SilentlyContinue } @@ -223,7 +223,7 @@ Function FixWhitelistedApps { Get-AppxPackage -allusers Microsoft.Paint3D | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} Get-AppxPackage -allusers Microsoft.WindowsCalculator | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} Get-AppxPackage -allusers Microsoft.WindowsStore | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} - Get-AppxPackage -allusers Microsoft.Windows.Photos | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} } } + Get-AppxPackage -allusers Microsoft.Windows.Photos | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} } } Write-Output "Initiating Sysprep"