Skip to content

huimiu/Uninstall-Copilot-Agents

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Remove Copilot Agents Automatically

This PowerShell script helps you uninstall Copilot Agents.

Prerequisites

  • Teams Toolkit CLI: npm install -g @microsoft/teamsapp-cli

Usage

  1. Open M365 Copilot in Browser.
  2. Press F12 to open the Developer Tools.
  3. Go to Network tab, filter with GetGptList, refresh the web page. Snipaste_2024-12-03_16-08-53
  4. Find the request named GetGptList?request=....
  5. Click on the request, go to Preview tab, right click the response body, and select Copy value. Snipaste_2024-12-03_16-11-35
  6. Paste the value into GptList.json file.
  7. Navigate to the directory containing the Uninstall-Agents.ps1 script.
  8. Run the script:
    .\Uninstall-Agents.ps1

Notes:

  • You can add agent names to the $whiteList array to skip uninstalling them.
  • This script will uninstall all agents owned by the current user except the ones in the white list.

About

Powershell script for uninstalling Copilot Agents

Resources

Stars

Watchers

Forks