NonRemovable apps were still getting attempted in the debloat all functions that were always throwing errors that were just hanging on initalizing floating above the powershell window running.
Fixed Prompt position after the .NET prompt that wouldn't show the Do you want to power down Prompt
Fixed the Write-Host saying you didn't want to remove one drive after selecting 'no' to not unpin tiles.
added ' -and $_.NonRemovable -eq "False"' to the Get-AppxPackage code lines to help sort through apps that can't get deleted and just get skipped anyways.
Onedrive fixes and code reuse from GUI moved over to interactive script code.
Removed [CmdletBinding()] and Param() that wasn't being used.
Fixed Write-Output to Write-Host
Added ' -and $_.NonRemovable -eq "False"' to GUI code as well in the DebloatAll function
Started out adding a new feature about removing 3D objects from explorer in This PC but I found a lot of code re use and found bugs when I went to add it to the GUI
Fixed -Verbose being used where Write-Host is already being used.
Fixed Admin check so it works, it was removed last year for some reason after I added it when I started adding my code to this project from my old debloat.
Fixed some code reuse where -ErrorAction SilentlyContinue is called multiple times even after it's already a global settings set in the start of the function.
Removed -Name from where it just wasn't needed to slim down file size.
Fixed the OneDrive button so it workes without errors and finds everything the way it should.
Shortened .NET 3.5 section to slim down file size
Fixed Disable Windows Store Automatic Updates code so it runs without errors and is shorter.
I added the following apps to the whitelist to not be removed.
Microsoft.DesktopAppInstaller
Microsoft.HEIFImageExtension
Microsoft.ScreenSketch
Microsoft.StorePurchaseApp
Microsoft.VP9VideoExtensions
Microsoft.WebMediaExtensions
Microsoft.WebpImageExtension
I added code to perform self elevation asking for the script to be run as an Administrator, otherwise the script will not be able to perform at its best.
This resolves issue #73
I added code to check for the OneDrive folder and its files before removal. If it finds that the folder exists, it will then check to see if there are files inside of the folder. If there are no files then OneDrive is uninstalled.
If there are files, then it creates a new folder called OneDriveBackupFiles on the user's desktop, move all of the files into that folder, and then removes OneDrive.
This is a safety measure after a user had their OneDrive files (unfortunately) deleted from their machine.
I added a new blacklist function called DebloatBlacklist which will only remove the specified bloatware in the array in the function.
I also renamed the Start-Debloat function to DebloatAllApps since it seemed to remove absolutely everything related to the Microsoft Store (Any games, apps, etc).
When you hit "Yes" in the first prompt, you will be asked if you want debloat via a blacklist or if you want to remove everything, in terms of apps.
I fixed a bug that was forcing the script to either hang or to completely kill the PowerShell Session in VSCode. I removed any variables that were added in the code but never declared called $PublishSettings.
The script runs properly now and no longer kills the PowerShell session or hangs.
I added code to create a new PSDrive for HKCR so that the function can access the portion of the registry associated with HKCR and create/modify the specific registry keys.
I believe this resolves the function from hanging.