New answers tagged

0 votes

How can I use PnP Powershell to enable custom script in a subsite?

Custom script can only be enabled in the site collection level. In the SharePoint admin center, you can choose to allow users to run custom script on OneDrive (referred to as "personal sites"...
Emily Du - MSFT's user avatar
-1 votes

How can I use PnP Powershell to enable custom script in a subsite?

Set-PnPTenantSite is for site collections, not subsites. Use Set-PnpSite Set-PnPSite -NoScriptSite $false See more information here: https://learn.microsoft.com/en-us/sharepoint/allow-or-prevent-...
Martin Iszac's user avatar
0 votes

Copy site root libraries and sub libraries with all permission using Get-PnPSiteTemplate

Try using the SharePoint CSOM, based on this, here is a snippet. See: Copy library to different site collection with pnp Function Copy-AllFilesWithMetadata { param ( [Parameter(Mandatory=$...
Martin Iszac's user avatar
0 votes

- DisableCustomAppAuthentication Parameter not found on Sharepoint Command set-spotenant -DisableCustomAppAuthentication $false

Install-Module -Name Microsoft.Online.SharePoint.PowerShell -RequiredVersion 16.0.20414.12000 This is the only version I found that had access to that property. Otherwise I received the same error ...
aalesund's user avatar
  • 101
0 votes

how to upload a file to a document library using OData in PowerShell with curl or Invoke-RestMethod

if the script will be running on the same machine as the Sharepoint, you can use PS snapin Microsoft.SharePoint.PowerShell: Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue ...
Bálint's user avatar
  • 341
0 votes

SharePoint online default templates

You can use PnP PowerShell script to remove page title / header section from SharePoint online modern experience site page: Connect-PnPOnline -Url https://tenant.sharepoint.com/sites/siteName -...
Ganesh Sanap - MVP's user avatar
0 votes

Setting SharePoint Group as SPGroup Owner using PowerShell

If you want it in SPO, you can do it via PNP PowerShell Connect to your SharePoint site Connect-PnPOnline -Url "https://your-sharepoint-site-url" -Credentials (Get-Credential) Retrieve the ...
Edwin's user avatar
  • 367
0 votes

How to get Site Id or Site Url for SharePoint Online 2013 (Office 365) site using Power Shell or CSOM

Do it with PnP: $TenantURL='123abc.sharepoint.com' $SiteName = 'MySite' $SiteURL = "https://$TenantURL/sites/$SiteName" $UserName='[email protected]' $Password = 'MyPa$$word' $...
caneta's user avatar
  • 103
0 votes

PowerShell PnP Unable to get file versions in big files

You can easily change the versioning settings on Document library for your OneDrive. Log on your OneDrive site and add into URL _layouts/15/viewlsts.aspx?view=14 so it will looks like: https://***-my....
Zdeněk Vinduška's user avatar
0 votes

PowerShell PnP Unable to get file versions in big files

I am having the same issue and it seems that this is coming from SharePoint when using PNP or CSOM. However, this works fine when using REST. Hence, you can overcome this using REST as follows Connect-...
Ahmed Amin's user avatar
1 vote

Is it possible to remove/hide/remove the "Stock Images" in SharePoint Online webpart?

Try using below SharePoint Online PowerShell command to hide web search images: Set-SPOTenant -FilePickerExternalImageSearchEnabled $false Documentation: Set-SPOTenant Follow below articles for ...
Ganesh Sanap - MVP's user avatar

Top 50 recent answers are included