Skip to main content
2 votes

CSOM PowerShell script - moving to modern authentication

If you are using the old SharePoint dlls. Make sure you install or are using the last PnP powershell library. Then you can use the following code to prompt the MFA ...
Vertamin's user avatar
  • 311
2 votes

Restrict PnPSearchQuery to just site and subsites not all tenant sites

You can use try using Path property in your search query to limit search results to specific SharePoint site. For example: $results=Submit-PnPSearchQuery -Query "N/A OR NA Path:https://myCompany....
Ganesh Sanap - MVP's user avatar
1 vote

SharePoint Online - unused content report

you can use graph api GET /reports/getSharePointSiteUsageDetail(period='{period_value}') sample you can use native page in SharePoint Admin center, you check Actives sites and "Last Activity"...
FredericDietrich's user avatar
1 vote

Add-SPOTheme : The term 'Add-SPOTheme' is not recognized as the name of a cmdlet, function, script file, or operable program

Your script is connecting to SharePoint using a cmdlet from the PnP.PowerShell module but is then using the Add-SPOTheme cmdlet from the Microsoft.Online.SharePoint.PowerShell module. To connect to ...
Callum Crowley's user avatar
1 vote

Need a powershell script to update 300+ SharePoint SitePages

@Taco_Buffet Got it figured out! Here's what I used to gather all highlighted content WebParts for all site pages for a specific site. Was able to change layoutID from "Card" ("Grid&...
Luke's user avatar
  • 13
1 vote

Get all comments from modern Site pages in SharePoint Online

You can use the REST API to call the /Comments endpoint: /_api/web/lists/GetByTitle('Site Pages')/GetItemById(x)/Comments Here is the PowerShell code: $SiteURL = "https://yourtenant.sharepoint....
TerminalVelocity's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible