Fighting Microsoft’s Forced Install of Outlook (new)

It’s now a “thing” that Microsoft shoe-horns the unwanted Outlook (new) onto my Windows machines every month. This sucks a lot so I dived into methods to remove it as soon as possible.

This is of course possible with Powershell:

# Define the app ID for New Outlook (Outlook for Windows)
$appId = "9NRX63209R7B"
$appName = "Outlook for Windows"

# Check if the app is installed using winget list
$installedOutlook = winget list | Select-String -Pattern $appName

if ($installedOutlook) {
    # Display the found app details and ask for confirmation
    Write-Host "Found $appName with ID: $appId"
    
    # Prompt user for uninstallation
    $confirmation = Read-Host "Do you want to uninstall $appName? (Y/N)"
    
    if ($confirmation -eq "Y") {
        # Uninstall the app using winget
        Write-Host "Uninstalling $appName..."
        winget uninstall --id $appId --source msstore
        Write-Host "$appName has been uninstalled."
    } else {
        Write-Host "Uninstallation canceled."
    }
} else {
    Write-Host "$appName is not installed on this system (Check the exact name or ID)."
}

This needs to be run in Powershell as an administrator; you can actually just paste it into the Powershell prompt and avoid the warnings you might get due to security restrictions on running it from a .ps1 file – it will work and does appear to remove, in a guided manner, the unwanted package.

Of course, automation is key here. Since Patch Tuesday requires a reboot, Task Scheduler with a trigger of “At Startup” seems the logical point to drop in a script to run when the machine reboots.

# Define the app ID for New Outlook (Outlook for Windows)
$appId = "9NRX63209R7B"

# Execute the uninstallation silently with no output
$null = winget uninstall --id $appId --source msstore -y

You could also simplify your Task Scheduler to run winget with parameters. Keep it simple?

winget uninstall 9NRX63209R7B

Finally, since I create supporting graphics using Copilot/Designer, I asked the “Thing” with a simple prompt. Yes, the expectation was that there might be some pushback……