How to disable mail client in windows 10

abdul latheef 31 Reputation points
2021-09-01T04:10:54.297+00:00

Hi,

I need to disable the windows default mail client in Windows 10 system. I have applied the GPO to disable this for all users but can't able to disable this app, policy is applied but still able to access and configure the email from the mail client.

Policy path:

User Configuration\Policies\Administrative Templates\Windows Mail

Scope:
User

Thanks
Abdul Latheef

Windows 10 Compatibility
Windows 10 Compatibility
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Compatibility: The extent to which hardware or software adheres to an accepted standard.
476 questions
{count} votes

Accepted answer
  1. Gabriel Oliveira 76 Reputation points
    2021-09-01T05:07:29.017+00:00

    Hi Abdul!

    You can remove Windows email application in Microsoft System Center Configuration Manager (SCCM) with script in Powershell

    Write-Output "Removing Windows 10 Mail Appx Package"
    Get-AppxPackage Microsoft.windowscomminicationsapps | Remove-AppxPackage
    Get-AppxPackage Microsoft.windowscomminicationsapps | Remove-AppxPackage -Allusers
    if(Get-AppxPackage -Name Microsoft.windowscommunicationsapps -AllUsers){
    Get-AppxPackage -Name Microsoft.windowscommunicationsapps -AllUsers | Remove-AppxPackage -AllUsers - Verbose -ErrorAction Continue
    }
    else{
    Write-Output "Mail app is not installed for any user"
    }
    if(Get-ProvisionedAppxPackage -Online | Where-Object {$_.Displayname -match "Microsoft.windowscommunicationsapps"}){
    Get-ProvisionedAppxPackage -Online |Where-Object {$_.DisplayName -Match "Microsoft.windowscommunicationsapps"} | Remove-AppxProvisionedPackage -Online -AllUsers -Verbose -ErrorAction Continue
    }
    else {
    Write-Output "Mails app is not installed for the system"
    }

    Save the script in the next path: C:\windows\system32\windowsPowerShell\V1.0\powershell.exe -executionpolicy bypass -file ".\mailremoval.ps1"

    In SCCM configuration, watch this vídeo:

    https://www.youtube.com/watch?v=3F0LiyqTM9k

    I hope I was helpfull

    Thanks!
    Gabriel Oliveira


5 additional answers

Sort by: Most helpful
  1. Whiley, Cecil 0 Reputation points
    2024-09-05T19:52:57.01+00:00

    Hi,

    I updated the script to also remove the Outlook Mail appx which is also a Mail client for windows.

    Write-Output "Removing Windows 10 Mail Appx Package"

    Get-AppxPackage Microsoft.windowscomminicationsapps | Remove-AppxPackage

    Get-AppxPackage Microsoft.windowscomminicationsapps | Remove-AppxPackage -Allusers

    Write-Output "Removing Outlook Mail Appx Package"

    Get-appxpackage Microsoft.OutlookForWindows | Remove-AppxPackage

    Get-appxpackage Microsoft.OutlookForWindows | Remove-AppxPackage -Allusers

    if(Get-AppxPackage -Name Microsoft.windowscommunicationsapps -AllUsers){

    Get-AppxPackage -Name Microsoft.windowscommunicationsapps -AllUsers | Remove-AppxPackage -AllUsers - Verbose -ErrorAction Continue

    }

    else{

    Write-Output "Mail app is not installed for any user"

    }

    if(Get-ProvisionedAppxPackage -Online | Where-Object {$_.Displayname -match "Microsoft.windowscommunicationsapps"}){

    Get-ProvisionedAppxPackage -Online |Where-Object {$_.DisplayName -Match "Microsoft.windowscommunicationsapps"} | Remove-AppxProvisionedPackage -Online -AllUsers -Verbose -ErrorAction Continue

    }

    else {

    Write-Output "Mails app is not installed for the system"

    }

    if(Get-AppxPackage -Name Microsoft.OutlookForWindows -AllUsers){

    Get-AppxPackage -Name Microsoft.OutlookForWindows -AllUsers | Remove-AppxPackage -AllUsers - Verbose -ErrorAction Continue

    }

    else{

    Write-Output "Outlook Mail App is not installed for any user"

    }

    if(Get-ProvisionedAppxPackage -Online | Where-Object {$_.Displayname -match "Microsoft.OutlookForWindows"}){

    Get-ProvisionedAppxPackage -Online |Where-Object {$_.DisplayName -Match "Microsoft.OutlookForWindows"} | Remove-AppxProvisionedPackage -Online -AllUsers -Verbose -ErrorAction Continue

    }

    else {

    Write-Output "Outlook Mail app is not installed for the system"

    }

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.