0

I want users to automatically be directed to the Document Library when visiting a Sharepoint Site (sites/sitename/Shared%20Documents/Forms/AllItems.aspx). These are Office 365 group sites being used primarily for file sharing/syncing.

Using a page that contains the document library web part does not suffice as the web part does not include all the file and folder functions.

If I use Pages > +New > Link and use the document library URL, the resulting link opens a download of the URL shortcut when set as the homepage.

I see no available SPO cmdlets or parameters of existing cmdlets that allow setting the home page similar to Set-SPOHomeSite. This cmdlet seems to only set the global home site for the tenant, not for a specific site, and if I try to use Connect-SPOService on a specific /sites/ it fails to authenticate. I was hoping for something like:

Set-SPOSite -Identity https://tenant.sharepoint.com/sites/sitename -HomePageURL https://tenant.sharepoint.com/sites/sitename/Shared%20Documents/Forms/AllItems.aspx

0

You could use pnp powershell Set-PnPHomePage to set Document Library as Site's Homepage.

Connect-PnPOnline https://tenant.sharepoint.com/sites/michael/
Set-PnPHomePage -RootFolderRelativeUrl Shared%20Documents/Forms/AllItems.aspx

Please read this articel about Set-PnPHomePage:

https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/set-pnphomepage?view=sharepoint-ps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.