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.
This commit is contained in:
Richard Newton 2018-02-21 13:31:23 -08:00 committed by GitHub
parent 7302794884
commit 56d424df86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"