Debloat-Windows-10
                                
                                
                                
                                    Debloat-Windows-10 copied to clipboard
                            
                            
                            
                        explorer.exe restart - folder instead of GUI
Line 52 of remove-onedrive.ps1
If you have the option to "Launch folder windows in a separate process" in "Folder Options" checked, then after running remove-onedrive.ps1, explorer.exe loads the "Computer" explorer window, instead of loading the expected start menu, taskbar, system tray.
Maybe explorer.exe didn't fully exit?
Tried it on two computers with the same results.
taskkill.exe /F /IM "explorer.exe" should kill all instances. I guess you are right in that the explorer might not be correctly reloaded in this scenario.
However, I don't think this is an issues as the remainder of the script should be independent and a restart is highly encouraged after running the scripts.
I'll leave this issue open, but I don't think I'll spend time fixing it. Anyway, thank you for the heads-up.