From d8979dc7e294412f0550dbd4f38ba1b8bc69fa53 Mon Sep 17 00:00:00 2001 From: Maximilian Cosmo Sitter <48606431+mcsitter@users.noreply.github.com> Date: Wed, 15 Jul 2020 15:27:07 +0200 Subject: [PATCH] FIX #240 and #259 The explorer process could not be killed, because powershell cannot convert the "Explorer.exe" value of type "System.String" to type "System.Diagnostics.Process". Description and solution in #240 . If issues still occur we could try the solution proposed in #259 --- Windows10SysPrepDebloater.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Windows10SysPrepDebloater.ps1 b/Windows10SysPrepDebloater.ps1 index df9d026..f97de1b 100644 --- a/Windows10SysPrepDebloater.ps1 +++ b/Windows10SysPrepDebloater.ps1 @@ -176,7 +176,7 @@ Function Protect-Privacy { Write-Output "Removing CloudStore from registry if it exists" $CloudStore = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\CloudStore' If (Test-Path $CloudStore) { - Stop-Process Explorer.exe -Force + Stop-Process -Name explorer -Force Remove-Item $CloudStore -Recurse -Force Start-Process Explorer.exe -Wait }