# Win11Debloat — Business PC App Removal Script
# For Cascades senior living staff machines
# Removes games, social media, entertainment, and other non-business apps
# Keeps: Calculator, Notepad, Snipping Tool, Photos, Paint, Camera, Store,
#        Sticky Notes, Alarms, OneDrive, Outlook, Teams, Office Hub,
#        Windows Terminal, Remote Desktop, Quick Assist
#
# Usage (run as Administrator in PowerShell):
#
#   Option 1 — One-liner (downloads and runs automatically):
#     & ([scriptblock]::Create((irm "https://debloat.raphi.re/"))) -RemoveApps -Apps "Microsoft.GamingApp, Microsoft.XboxApp, Microsoft.XboxGameOverlay, Microsoft.XboxGamingOverlay, Microsoft.XboxSpeechToTextOverlay, Microsoft.Xbox.TCUI, Microsoft.MicrosoftSolitaireCollection, king.com.CandyCrushSaga, king.com.CandyCrushSodaSaga, king.com.BubbleWitch3Saga, Asphalt8Airborne, CaesarsSlotsFreeCasino, COOKINGFEVER, DisneyMagicKingdoms, FarmVille2CountryEscape, HiddenCity, MarchofEmpires, RoyalRevolt, Facebook, Instagram, TikTok, Twitter, LinkedInforWindows, XING, Viber, Netflix, Spotify, Disney, HULULLC.HULUPLUS, AmazonVideo.PrimeVideo, SlingTV, PandoraMediaInc, iHeartRadio, TuneInRadio, Plex, Shazam, Flipboard, Microsoft.BingNews, Microsoft.News, Microsoft.BingWeather, Microsoft.BingSports, Microsoft.BingFinance, Microsoft.BingFoodAndDrink, Microsoft.BingHealthAndFitness, Microsoft.BingTranslator, Microsoft.BingTravel, Clipchamp.Clipchamp, Microsoft.Copilot, Microsoft.Windows.AIHub, Microsoft.549981C3F5F10, Microsoft.MicrosoftJournal, Microsoft.Whiteboard, Microsoft.Office.Sway, Microsoft.PowerAutomateDesktop, Microsoft.MicrosoftPowerBIForWindows, Microsoft.StartExperiencesApp, Microsoft.3DBuilder, Microsoft.Microsoft3DViewer, Microsoft.MSPaint, Microsoft.Print3D, Microsoft.MixedReality.Portal, Amazon.com.Amazon, Microsoft.WindowsFeedbackHub, Microsoft.Getstarted, Microsoft.M365Companions, Microsoft.YourPhone, Microsoft.BingSearch, Microsoft.ZuneVideo, Microsoft.SkypeApp, Microsoft.People, Microsoft.Messaging, Microsoft.OneConnect, Microsoft.NetworkSpeedTest, AutodeskSketchBook, DrawboardPDF, Duolingo-LearnLanguagesforFree, NYTCrossword, OneCalendar, PhototasticCollage, PicsArt-PhotoStudio, PolarrPhotoEditorAcademicEdition, WinZipUniversal, Wunderlist, AdobeSystemsIncorporated.AdobePhotoshopExpress, ActiproSoftwareLLC, CyberLinkMediaSuiteEssentials, fitbit, Sidia.LiveWallpaper"
#
#   Option 2 — From downloaded copy (if Win11Debloat is already extracted):
#     cd C:\path\to\Win11Debloat
#     Set-ExecutionPolicy Unrestricted -Scope Process -Force
#     .\Win11Debloat.ps1 -RemoveApps -Apps "<same app list>"
#
# Apps not present on the machine are silently skipped.
# Source: https://github.com/Raphire/Win11Debloat/wiki/App-Removal

# --- App list (one per line for readability) ---
$apps = @(
    # Gaming / Xbox
    "Microsoft.GamingApp"
    "Microsoft.XboxApp"
    "Microsoft.XboxGameOverlay"
    "Microsoft.XboxGamingOverlay"
    "Microsoft.XboxSpeechToTextOverlay"
    "Microsoft.Xbox.TCUI"
    "Microsoft.MicrosoftSolitaireCollection"

    # Bloatware games
    "king.com.CandyCrushSaga"
    "king.com.CandyCrushSodaSaga"
    "king.com.BubbleWitch3Saga"
    "Asphalt8Airborne"
    "CaesarsSlotsFreeCasino"
    "COOKINGFEVER"
    "DisneyMagicKingdoms"
    "FarmVille2CountryEscape"
    "HiddenCity"
    "MarchofEmpires"
    "RoyalRevolt"

    # Social media
    "Facebook"
    "Instagram"
    "TikTok"
    "Twitter"
    "LinkedInforWindows"
    "XING"
    "Viber"

    # Entertainment / streaming
    "Netflix"
    "Spotify"
    "Disney"
    "HULULLC.HULUPLUS"
    "AmazonVideo.PrimeVideo"
    "SlingTV"
    "PandoraMediaInc"
    "iHeartRadio"
    "TuneInRadio"
    "Plex"
    "Shazam"
    "Flipboard"

    # Bing / News / Weather
    "Microsoft.BingNews"
    "Microsoft.News"
    "Microsoft.BingWeather"
    "Microsoft.BingSports"
    "Microsoft.BingFinance"
    "Microsoft.BingFoodAndDrink"
    "Microsoft.BingHealthAndFitness"
    "Microsoft.BingTranslator"
    "Microsoft.BingTravel"

    # Unused Microsoft apps
    "Clipchamp.Clipchamp"
    "Microsoft.Copilot"
    "Microsoft.Windows.AIHub"
    "Microsoft.549981C3F5F10"          # Cortana
    "Microsoft.MicrosoftJournal"
    "Microsoft.Whiteboard"
    "Microsoft.Office.Sway"
    "Microsoft.PowerAutomateDesktop"
    "Microsoft.MicrosoftPowerBIForWindows"
    "Microsoft.StartExperiencesApp"    # Widgets
    "Microsoft.WindowsFeedbackHub"
    "Microsoft.Getstarted"             # Get Started / Tips
    "Microsoft.M365Companions"
    "Microsoft.YourPhone"              # Phone Link
    "Microsoft.BingSearch"
    "Microsoft.ZuneVideo"              # Movies & TV
    "Microsoft.SkypeApp"
    "Microsoft.People"
    "Microsoft.Messaging"
    "Microsoft.OneConnect"
    "Microsoft.NetworkSpeedTest"

    # 3D / Creative (not needed)
    "Microsoft.3DBuilder"
    "Microsoft.Microsoft3DViewer"
    "Microsoft.MSPaint"                # Paint 3D (not regular Paint)
    "Microsoft.Print3D"
    "Microsoft.MixedReality.Portal"

    # Third-party bloat
    "Amazon.com.Amazon"
    "AutodeskSketchBook"
    "DrawboardPDF"
    "Duolingo-LearnLanguagesforFree"
    "NYTCrossword"
    "OneCalendar"
    "PhototasticCollage"
    "PicsArt-PhotoStudio"
    "PolarrPhotoEditorAcademicEdition"
    "WinZipUniversal"
    "Wunderlist"
    "AdobeSystemsIncorporated.AdobePhotoshopExpress"
    "ActiproSoftwareLLC"
    "CyberLinkMediaSuiteEssentials"
    "fitbit"
    "Sidia.LiveWallpaper"
) -join ", "

# --- Run via one-liner (download + execute) ---
& ([scriptblock]::Create((irm "https://debloat.raphi.re/"))) -RemoveApps -Apps $apps
