Skip to main content

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

Set_Environment

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

Copilot_Revert

To disable and uninstall Copilot, run without any parameter:

Normal_Execution

Dependencies

User Parameters

NameExampleRequiredDescription
Revert1FalseRevert the Copilot changes to enable and install it on the agents where script has disabled and uninstalled it in the past.
Set_Envrionment1FalseThis is required to be run during import with value 1 so that the EDFs got imported for the solution to run properly.

EDFs

NameLevelTypeSectionExampleDescription
Copilot_StatusComputerTextCopilotDisabled -- 2025-02-28 00:00:00This stores the Copilot status after script completion with the script ran date and time
Exclude Copilot RevertComputerCheckboxExclusions1 or 0This excludes the copilot revert action for the computer where it is checked
Exclude Copilot RevertLocationCheckboxExclusions1 or 0This excludes the agents of the location where it is checked
Exclude Copilot DisableComputerCheckboxExclusions1 or 0This excludes the agent from getting its copilot disabled and uninstalled
Exclude Copilot DisableLocationCheckboxExclusions1 or 0This excludes the agents of the location from getting its copilot disabled and uninstalled
Copilot Revert EnableClientCheckboxCopilot1 or 0This check box allows the agents of clients to revert the Copilot disabling and uninstallation
Copilot Disable and UninstallClientCheckboxCopilot1 or 0This 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