You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to enable the feature 8a4b8de2-6fd8-41e9-923c-c7c3c00f8295 -> "Open Documents in Client Applications by Default" for all SharePoint Sites a Client has (about 120). Here's what I have so far:
import-module pnp.powershell
Import-Module Microsoft.Online.SharePoint.PowerShell -UseWindowsPowerShell
#Parameters
$SiteURL = "https://xxxxxxx-admin.sharepoint.com"
$FeatureID= "8a4b8de2-6fd8-41e9-923c-c7c3c00f8295" #Open Documents in Client Applications by Default
Connect-SPOService -url $SiteURL
$sites = get-sposite -limit all
#Connect to SharePoint Online site
foreach ($site in $sites){
$currentconn = Connect-PnPOnline $site.Url -ClientId "9e6770c0-a6ad-43b3-8c97-0eaaf97f1d37" -ClientSecret "xxxxxxxxxxxxxxxxxxx" -WarningAction Ignore -ReturnConnection
Enable-PnPFeature -Connection $currentconn -Identity $FeatureID
}
I'm using powershell 7.4, pnp.powershell 2.99.100, Microsoft.Online.SharePoint.PowerShell 1.0. Connection works fine with my EntraID App and I also get something back:
Now the problem is whenever I want to enable the feature on the current site, I get the an error:
PS C:\Users\xxxxxxxx\PowerShell> Enable-PnPFeature -Connection $currentconn -Identity $FeatureID -Verbose
Enable-PnPFeature: Value cannot be null. (Parameter 'source')
What's the issue here? Is the connection not good? Am I missing permissions? The same error also happens if I want to use get-pnpfeature. So something with my connection seems to go wrong.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'm trying to enable the feature 8a4b8de2-6fd8-41e9-923c-c7c3c00f8295 -> "Open Documents in Client Applications by Default" for all SharePoint Sites a Client has (about 120). Here's what I have so far:
I'm using powershell 7.4, pnp.powershell 2.99.100, Microsoft.Online.SharePoint.PowerShell 1.0. Connection works fine with my EntraID App and I also get something back:
Now the problem is whenever I want to enable the feature on the current site, I get the an error:
What's the issue here? Is the connection not good? Am I missing permissions? The same error also happens if I want to use get-pnpfeature. So something with my connection seems to go wrong.
Thanks and kind regards.
Beta Was this translation helpful? Give feedback.
All reactions