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.
https://pnp.github.io/powershell/
Then you can use the following code to prompt the MFA ...
1
vote
Accepted
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"...
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 ...
1
vote
Accepted
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&...
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....
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
sharepoint-online-powershell × 14sharepoint-online × 10
powershell × 5
pnp-powershell × 5
powershell-script × 3
list × 1
csom × 1
site-template × 1
modern-pages × 1
microsoft-teams × 1
sitepages × 1
document-id × 1
site-usage × 1
list-comments × 1