Categories
Agents AI Microsoft 365 SharePoint

Enabling Knowledge Agents in SharePoint: Pain control

Microsoft’s Knowledge Agent rollout promises smarter content discovery across SharePoint. But for many SharePoint admins, the setup hits unexpected snags, especially if you’re strong in SharePoint but less familiar with PowerShell’s quirks. It would be handy to know where the troubles are and how to work around them.

What the Docs Don’t Tell You

The Problem

The SharePoint Knowledge Agent is part of Microsoft’s broader push toward AI-enhanced content discovery and organisational intelligence. It’s designed to surface relevant information across your SharePoint environment by leveraging semantic understanding, user context, and intelligent indexing. Instead of relying solely on keyword search or manual navigation, the Knowledge Agent can proactively suggest documents, pages, and insights that align with what a user is working on – whether that’s drafting a proposal, onboarding a new team member, or researching a topic. You get to spend less time hunting for content and more time acting on it, especially in environments where knowledge is distributed across teams, departments, or legacy structures. For SharePoint admins and architects (and anyone else trying to stay on the front foot of the Microsoft Copilot push), it’s a strategic upgrade that aligns with Microsoft’s vision for adaptive, AI-powered collaboration. It’s definitely worth trialing now to shape how your organisation benefits from Copilot integrations in the future. If you can get it running (it’s currently in preview, so you need to manually enable it) you get a neat floating Copilot icon on your SharePoint pages and the expected popover prompt.

My experience setting this up using the limited Microsoft documentation (https://learn.microsoft.com/en-us/sharepoint/knowledge-agent-get-started#enable-knowledge-agent) was anything but straightforward. If I was a Powershell expert maybe I would have had more luck, but I’m not and neither the documentation nor MS support were much help; though they do appear to have partly updated the docs based on my feedback, so that’s nice.

I hit multiple blockers that aren’t mentioned in the documentation. Here’s (the short version) of what went wrong, and how to fix it.

Common Blockers (and How to Fix Them)

According to the Learn article all you have to do is run:

Set-SPOTenant -KnowledgeAgentScope AllSites

I immediatley got this error:

My attempts to solve it were stymied by the PowerShell execution policy blocking script modules; something I hadn’t previously encountered and not apprarent in the errors I was getting. With Copilot’s help this fixed it temporarily using this:

Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned -Force

The next issue was having the latest version of the SharePoint Online Management Shell. In my case I had 2 version installed; one was older than the required version and one more up-to-date than the one Microsoft support told me to look for. My solution was to uninstall both and install afresh. See below for how to do that.

When I did get that cleaned up I got another error:

Get-Command : The term 'Set-SPOTenant' is not recognized as the name of a cmdlet…

Which gave an error because the SharePoint module was installed but not yet loaded into the session. This fixed that:

Import-Module Microsoft.Online.SharePoint.PowerShell

Progress. That left me able to do the following to connect the module to my tenant (I did know how to do this), which requested a log in.

Connect-SPOService -Url https://MyTenant-admin.sharepoint.com

With me now connected successfully to the tenant with an up to date, clean SharePoint Online Management Shell and the policy permissoins to use it I was finally able to go back to enabling the agent:

Set-SPOTenant -KnowledgeAgentScope AllSites

Result: Executed without errors. Knowledge Agent is finally enabled across all sites! Belt and braces, you can verify it with the following. Or just refresh a SharePoint page and look for the new toys.

Get-SPOTenant | Select-Object KnowledgeAgentScope

Step-by-Step Fix Workflow

  1. Uninstall legacy MSI version
    Go to Settings > Apps > Installed apps, search for “SharePoint Online Management Shell,” and uninstall it. Then manually delete:
C:\Program Files\SharePoint Online Management Shell\C:\Program Files\SharePoint Online Management Shell\

You can also try

Get-Module -Name *SharePoint* -ListAvailable

then

Uninstall-Module -Name <ModuleName>

2. Install latest module via PowerShell Gallery
Open PowerShell as Admin:

Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned -Force
Import-Module PowerShellGet -Force
Install-Module -Name Microsoft.Online.SharePoint.PowerShell

Import the module manually

Import-Module Microsoft.Online.SharePoint.PowerShell

Connect to your tenant
Don’t forget to replace yourtenant with your actual tenant name:

Connect-SPOService -Url https://yourtenant-admin.sharepoint.com

Enable Knowledge Agent

Set-SPOTenant -KnowledgeAgentScope AllSites

Verify the setting

Get-SPOTenant | Select KnowledgeAgentScope

Feedback

I have suggested the following to Microsoft to improve in the documentation

  • No mention of execution policy blockers: PowerShell scripts may silently fail unless policies are adjusted.
  • No guidance on legacy MSI conflicts: Coexistence causes cmdlet ambiguity and version mismatch.
  • Assumes module auto-loads: Many users won’t know to manually import it.
  • No post-install checklist: Users need a way to verify cmdlet availability and parameter support.

Final Thoughts

If you’re a SharePoint admin venturing into PowerShell territory, expect friction; but it’s fixable, especially if you persist with getting help from Copilot etc. I’ll happily accept any criticism of my PS skills; though I note that I’m not atypical.

Microsoft’s documentation needs to bridge the gap between platform expertise and scripting nuance. Until then, I hope this guide may have helped you get Knowledge Agents up and running without the guesswork.

If I missed anything or got anything wrong in this article let me know so that I can improve it. I’m off to play now.

Simon's avatar

By Simon

Simon Hudson is an entrepreneur and health sector specialist. He formed Cloud2 in 2008 following a rich career in the international medical device industry and the IT industry. Simon’s background encompasses quality assurance, medical device development, international training, business intelligence and international marketing and health related information and technology.

Simon’s career has spanned both the UK and the international health industry, with roles that have included quality system auditing, medical device development, international training (advanced wound management) and international marketing. In 2000 he co-founded a software-based Clinical Outcomes measurement start-up in the US. Upon joining ioko in 2004 he created the Carelink division and, as General Manager, drove it to become a multi-million pound business in its own right.
In 2008, Simon founded Cloud2 in response to a need for a new way of delivering successful projects based on Microsoft SharePoint. This created the first commercial ‘Intranet in a Box’ solution and kickstarted a new industry. He exited that business in 2019, which has continued to grow as a leading provider of Power BI and analytics solutions.

In 2016, he co-founded Kinata Ltd. to enable effective Advice and Guidance in the NHS and is currently guiding the business beyond its NHS roots to address needs in Her Majesty’s Prisons and in Australasia.

In 2021, Simon founded Novia Works Ltd.

In 2021 he was invited to become Entrepreneur in Residence at the University of Hull.

In 2022 he was recognised as a Microsoft MVP.

In 2025 he founded Sustainable Ferriby CIC, a community energy not-for-profit to develop energy generation, energy & carbon reduction, and broader sustainability & NetZero projects in the West Hull villages.

Simon has had articles and editorials published in a variety of technology, knowledge management, clinical benchmarking and health journals, including being a regular contributor to PC Pro, as well as a presenter at conferences. He publishes a blog on areas of interest at noviaworks.co.uk. He is a co-facilitator of the M365 North User Group. He is a lead author and facilitator on the Maturity Model for Microsoft 365. He is the author of two patents relating to medical devices. He holds a BSc (Hons) in Physical Science and a PGCE in Physics and Chemistry from the University of Hull.

Simon is passionate about rather too many things, including science, music (he plays guitar and octave mandola), skiing, classic cars, narrowboats, the health sector, sustainability, information technology and, by no means least, his family.

Leave a comment