{"id":17655818,"url":"https://github.com/pyenb/outlook-desktop-ad-blocker","last_synced_at":"2025-08-23T06:36:49.593Z","repository":{"id":188341158,"uuid":"678540894","full_name":"Pyenb/Outlook-desktop-ad-blocker","owner":"Pyenb","description":"A simple script that patches your systems hosts file to stop the Outlook desktop client from displaying ads in your inbox.","archived":false,"fork":false,"pushed_at":"2025-02-08T11:24:54.000Z","size":310,"stargazers_count":113,"open_issues_count":4,"forks_count":4,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-08-19T12:29:58.547Z","etag":null,"topics":["adblock","adblocker","adblocking","ads","batch","batch-script","email","hostsfile","microsoft","microsoft-office","outlook","outlook-365","outlook-desktop","outlook-desktop-client","powershell","powershell-script"],"latest_commit_sha":null,"homepage":"","language":"Batchfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pyenb.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"Pyenb","ko_fi":"Pyenb"}},"created_at":"2023-08-14T19:44:26.000Z","updated_at":"2025-08-18T14:31:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"e02a5a49-9ba3-4cd9-89d6-b5982a7c7795","html_url":"https://github.com/Pyenb/Outlook-desktop-ad-blocker","commit_stats":null,"previous_names":["pyenb/outlook-desktop-ad-blocker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Pyenb/Outlook-desktop-ad-blocker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pyenb%2FOutlook-desktop-ad-blocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pyenb%2FOutlook-desktop-ad-blocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pyenb%2FOutlook-desktop-ad-blocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pyenb%2FOutlook-desktop-ad-blocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pyenb","download_url":"https://codeload.github.com/Pyenb/Outlook-desktop-ad-blocker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pyenb%2FOutlook-desktop-ad-blocker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271745679,"owners_count":24813521,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adblock","adblocker","adblocking","ads","batch","batch-script","email","hostsfile","microsoft","microsoft-office","outlook","outlook-365","outlook-desktop","outlook-desktop-client","powershell","powershell-script"],"created_at":"2024-10-23T13:08:08.502Z","updated_at":"2025-08-23T06:36:49.559Z","avatar_url":"https://github.com/Pyenb.png","language":"Batchfile","funding_links":["https://github.com/sponsors/Pyenb","https://ko-fi.com/Pyenb"],"categories":[],"sub_categories":[],"readme":"# Outlook desktop ad blocker\n\nThis is a simple patch to the Windows hosts file, that causes the Outlook desktop client to stop displaying those *annoying* ads in your inbox. There will still be an empty space, but no more ads that you can accidentially click on.\n\nThis simply works disallowing your PC to access the domain `outlookads.live.com`, which outlook uses to fetch the ads it displays.\n\n---\n\n## Contents\n\n1. [Installation](#download--how-to-use-it)\n2. [Before and after](#before-and-after)\n3. [Other OS support](#other-os-support)\n\n## Download / How to use it?\n\n### Method 1 - PowerShell (Recommended)\n\n1. On Windows 8.1/10/11, right-click on the Windows start menu and select PowerShell or Terminal (Not CMD). If you don't know how to do this, check out [this article](https://www.howtogeek.com/662611/9-ways-to-open-powershell-in-windows-10/).\n2. Copy and paste the following command into the PowerShell window and press enter. This command downloads a script from the repository and executes it:\n\n```\nirm https://raw.githubusercontent.com/Pyenb/Outlook-desktop-ad-blocker/main/tools/download.ps1 | iex\n```\n\n3. There will be a prompt asking for admin rights (these are needed to edit the hosts file). Press `Yes`.\n4. Follow the instructions on screen or check the [usage](#usage) section.\n5. Restart Outlook desktop and enjoy your ad free experience.\n\n### Method 2 - Traditional\n\n1. Download the [adblock.cmd](https://github.com/Pyenb/Outlook-desktop-ad-blocker/blob/main/adblock.cmd) file to your PC.\n2. Execute the `adblock.cmd` file.\n3. There will be a prompt asking for admin rights (these are needed to edit the hosts file). Press `Yes`.\n4. Follow the instructions on screen or check the [usage](#usage) section.\n5. Restart Outlook desktop and enjoy your ad free experience.\n\n### Method 3 - Manual\n\n1. Follow the [manual installation](#manual-install) below.\n\n---\n\n## Usage\n\nAfter executing, you will see the following screen. The script will tell you, if the adblocker is already installed or not. To [install](#install) the adblocker, press `1`. To [uninstall](#uninstall) the adblocker, press `2`. To exit the script, press `0`. There will be on screen instructions for each step.\n\n![using](images/men.png)\n\n### Install\n\nWhen choosing the option `1`, the adblocker will be installed.\n\n![installing](images/ins.png)\n\n### Uninstall\n\nWhen choosing the option `2`, the adblocker will be uninstalled.\n\n![uninstalling](images/uns.png)\n\n## Manual install\n\nDon't trust my script or having problems? This is how you can DIY.\n\n1. Open a text editor of your choice as administrator.\n2. Open the `hosts` file, located at `C:\\Windows\\System32\\drivers\\etc\\hosts`.\n3. Add the text `0.0.0.0 outlookads.live.com` as a new line inside the `hosts` file.\n4. Save the file and restart Outlook desktop.\n5. Enjoy your ad free experience.\n\n## Before and after\n\n**Before:**\n\n![Before](images/bef.png)\n\n**After:**\n\n![After](images/aft.png)\n\n## Other OS support\n\nThis was only tested on Windows 11, but should work on any other OS. To do this, just search on how to edit your hosts file and make the same edits as in [the manual installation](#manual-install). Just make sure you use the correct path to your hosts file.\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\n## Disclaimer\n\nThis repository is for research purposes only, the use of this code is your responsibility.\n\nI take NO responsibility and/or liability for how you choose to use any of the source code available here. By using any of the files available in this repository, you understand that you are AGREEING TO USE AT YOUR OWN RISK. Once again, ALL files available here are for EDUCATION and/or RESEARCH purposes ONLY.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyenb%2Foutlook-desktop-ad-blocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyenb%2Foutlook-desktop-ad-blocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyenb%2Foutlook-desktop-ad-blocker/lists"}