Created
June 18, 2020 14:58
-
-
Save OlafD/6a8767e37e2b0be51599b89d8563996d to your computer and use it in GitHub Desktop.
In a SharePoint Online site with a Communication Site template, the Site Assets library is not created by default. It will automatically added, when a user uploads images or changes the site logo. This script will create the Site Assets library, when it is necessary to have it during other processes after site creation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Connect-PnPOnline -Url {your_site_url} | |
$web = Get-PnPWeb | |
$list = $web.Lists.EnsureSiteAssetsLibrary() | |
(Get-PnPContext).Load($list) | |
Invoke-PnPQuery |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment