1.9 KiB
Open Document in Client Application
Freitag, 8. Mai 2020
08:43
PowerShell script to change document open behavior:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue
\#Site Collection URL $SiteUrl = "http://intranet.crescent.com"
\#Get All sites under given site collection $WebsColl = Get-SPSite $SiteURL -Limit All | Get-SPWeb -Limit All
\#Iterate through each site foreach($web in $WebsColl) { \#Get All document libraries $LibrariesColl =$web.Lists | where {$_.BaseType -eq "DocumentLibrary" -and $_.BaseTemplate -eq "DocumentLibrary"}
foreach($Library in $LibrariesColl) { \#Set Document Open behavior $Library.DefaultItemOpen = "PreferClient" $Library.Update() Write-Host "Updated Document Library Settings on $($web.URL+"/"+$Library.RootFolder.URL)” } } |
---|
Aus <https://www.sharepointdiary.com/2015/11/open-documents-in-client-application-in-sharepoint-2013.html>