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:
Get-Command : The term 'Set-SPOTenant' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of
the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:2
(Get-Command Set-SPOTenant).Parameters.Keys -contains "KnowledgeAgent …
~~~~~
CategoryInfo : ObjectNotFound: (Set-SPOTenant:String) [Get-Command], CommandNotFoundException
FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand
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
- 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.
