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.
pull/11/merge
Richard Newton 7 years ago committed by GitHub
parent 7302794884
commit 56d424df86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save