Copilot - Enable/Disable
Summary
This script will uninstall and disable the Microsoft Copilot and Microsoft 365 copilot as well as its functionality in the Edge browser. It has the revert option available too to revert the changes to its original state. The Copilot changes stores to the computer-EDF from where the data populates to the DV. The revert and disable can be scheduled using Autofix monitors.
Sample Run
First Run: Run this script with Set_Environment = 1 to create required EDFs

Run this script with Revert = 1 to revert the Copilot changes on deman and ensure it gets enabled and installed.

To disable and uninstall Copilot, run without any parameter:

Dependencies
- Monitor - Copilot Disable and Uninstall
- Monitor - Copilot Revert Deployment
- Dataview - Copilot_Enable_Disable
- Solution - Copilot Disable/Uninstall & Revert
User Parameters
| Name | Example | Required | Description |
|---|---|---|---|
| Revert | 1 | False | Revert the Copilot changes to enable and install it on the agents where script has disabled and uninstalled it in the past. |
| Set_Envrionment | 1 | False | This is required to be run during import with value 1 so that the EDFs got imported for the solution to run properly. |
EDFs
| Name | Level | Type | Section | Example | Description |
|---|---|---|---|---|---|
| Copilot_Status | Computer | Text | Copilot | Disabled -- 2025-02-28 00:00:00 | This stores the Copilot status after script completion with the script ran date and time |
| Exclude Copilot Revert | Computer | Checkbox | Exclusions | 1 or 0 | This excludes the copilot revert action for the computer where it is checked |
| Exclude Copilot Revert | Location | Checkbox | Exclusions | 1 or 0 | This excludes the agents of the location where it is checked |
| Exclude Copilot Disable | Computer | Checkbox | Exclusions | 1 or 0 | This excludes the agent from getting its copilot disabled and uninstalled |
| Exclude Copilot Disable | Location | Checkbox | Exclusions | 1 or 0 | This excludes the agents of the location from getting its copilot disabled and uninstalled |
| Copilot Revert Enable | Client | Checkbox | Copilot | 1 or 0 | This check box allows the agents of clients to revert the Copilot disabling and uninstallation |
| Copilot Disable and Uninstall | Client | Checkbox | Copilot | 1 or 0 | This checkbox sets the agents of the client to disable its copilot and uninstall it completely |
Output
- Script log
- Computer EDF
- Local file directory
- Dataview
Changelog
2026-04-06
- Code signed PowerShell script
- Updated the downloadUrl for both 7zr.exe and 7z.7z
2025-04-10
- Updated script by adding the "Microsoft 365 Copilot" application removal and changing the file hash in the document.
2025-03-28
- Initial version of the document