Sunday, September 8, 2024
HomePowershellCreating an Asset Library in SharePoint — LazyAdmin

Creating an Asset Library in SharePoint — LazyAdmin


Firm branding is necessary in each group, regardless of the scale. Workers shouldn’t solely be capable to seize firm logos or different branding photographs when wanted rapidly, nevertheless it’s additionally necessary to make use of uniform PowerPoint templates for instance.

As an alternative of sharing or mailing across the newest model of the template, we will make the templates instantly accessible in PowerPoint or Phrase. To do that we’re going to create an Group Belongings Library in SharePoint.

On this article, I’ll present you methods to create the Group Belongings Library and methods to use it within the Microsoft 365 apps.

Necessities

To create the Group Belongings Library we want a SharePoint the place we will create the libraries in. Most suitable choice is to create a brand new SharePoint website for this to maintain all of it good and clear.

Additionally, to configure the libraries, we’re going to use PowerShell. To configure it, you’ll need to put in the SharePoint On-line Administration Shell module or the PnP On-line module.

You possibly can set up the SharePoint On-line module with the next PowerShell command:

Set up-Module -Identify Microsoft.On-line.SharePoint.PowerShell -Scope CurrentUser -Verify:$false -Power

Step 1 – Creating the SharePoint Libraries

Step one is to create a brand new SharePoint website. Within the SharePoint website, we’re going to create two doc libraries, one for the branding photographs and one for the Workplace templates. We don’t want Groups and many others, so I like to recommend creating a brand new Communication website:

  1. Open SharePoint On-line
  2. Click on on + Create Website
  3. Select Communication website
Create new Communcation site
  1. We are able to use the Commonplace Communication template. Optionally you could possibly additionally choose the Model Central template if you wish to elaborate extra with model property and tips.
  2. Give the location a reputation, for instance, “Group Belongings”

Creating the Doc Libraries

Within the new SharePoint website, we have to create doc libraries the place we will retailer the template information and model property (logos, photographs, and many others). We are able to solely create one library for the templates, however you’ll be able to create as many libraries as you need for the photographs (model property).

So you could possibly for instance create a library with solely the corporate logos and one other one with solely advertising and marketing photographs. On this article, we’ll solely create one for all the photographs and one for the templates to maintain it easy.

The outcome ought to look one thing like this:

Create document libraries in SharePoint Online

If you have already got photographs, logos, and templates that you simply need to use, you’ll be able to already add them instantly into the folders.

Creating thumbnails (elective)

When creating the picture libraries, they are going to be default displayed as only a coloured field with the title of the library. It’s nonetheless additionally attainable so as to add a customized thumbnail for the library. For this, you’ll need to add a sq. picture to the paperwork folders of the newly created website.

Copy direct image path

We have to copy the direct hyperlink to the thumbnail information for Step 3. You are able to do this by opening the picture particulars (click on on the three dots > particulars) and copying the Path. Reserve it in a notepad for later.

Step 2 – Establishing Permissions

To have the ability to use the SharePoint Asset Library in Workplace, we might want to modify some permissions. We have to give all people besides exterior customers, learn permissions to the libraries. To do that we’re going to use PowerShell.

First, we have to get the tenant ID, which you’ll find in Microsoft Entra. Develop Identification and click on on Overview, right here you will see your Tenant ID.

Entra Tenant ID

Step one is to connect with SharePoint On-line in PowerShell. If you’re utilizing PowerShell 7.x you’ll need to import the module with the parameter -UseWindowsPowerShell.

Observe that we’re utilizing the SharePoint Admin URL for the connection:

# Set up the SharePoint On-line module if you have not carried out but:
# Set up-Module -Identify Microsoft.On-line.SharePoint.PowerShell -Scope CurrentUser -Verify:$false -Power

# When utilizing PowerShell 7.x, import the module with the command beneath
# Import-Module Microsoft.On-line.SharePoint.PowerShell -UseWindowsPowerShell

Join-SPOService -url 'https://lazyadmin-admin.sharepoint.com/'

If you end up linked to SharePoint On-line, we will run the next script to set the permissions. Substitute the tenant ID with the one which we seemed up in Microsoft Entra, and make the siteUrl with the handle of the SharePoint website that we created in Step 1.

$tenantId = '11e55098-12ab-3456-aaf8-c5fasd13basa';
$siteUrl="https://lazydev.sharepoint.com/websites/OrganizationAssets";

$spoVisitorGroup = Get-SPOSiteGroup -Website $siteUrl | The place-Object {$_.LoginName -like "*Guests*"};
Add-SPOUser -Website $siteUrl -LoginName ('c:0-.f|rolemanager|spo-grid-all-users/{0}' -f $tenantId) -Group $spoVisitorGroup.LoginName;

If the language of your SharePoint is one thing else than English, then you’ll need to alter Guests to the title of the group to your language, for instance, for Dutch it’s Bezoekers. You possibly can simply examine it by working the command Get-SPOSiteGroup -Website $siteUrl.

Step 3 – Registering the Libraries

With the libraries created and the permissions set, we will register the asset libraries for our group. For the library URL, we might want to use the location URL, together with the doc library title. However with out the /Kinds/AllItems.aspx half:

Get the SharePoint URL

Substitute the templateLibraryUrl variable beneath and run the script to register the group asset library:

# Hyperlink to Doc Library with the templates
$templateLibraryUrl="https://lazydev.sharepoint.com/websites/OrganizationAssets/Officepercent20Templates"

Add-SPOOrgAssetsLibrary -LibraryURL $templateLibraryUrl -OrgAssetType OfficeTemplateLibrary -CdnType Non-public -Verify:$false

For the photographs, we might want to do the identical, however we’ll change the OrgAssetType to ImageDocumentLibrary. As talked about in Step 1, you should utilize customized thumbnails to your picture libraries, however they don’t seem to be wanted:

$brandingLibraryUrl="https://lazydev.sharepoint.com/websites/OrganizationAssets/Companypercent20Branding"

Add-SPOOrgAssetsLibrary -LibraryUrl $brandingLibraryUrl -OrgAssetType ImageDocumentLibrary -CdnType Non-public -Verify:$false

# elective: if you wish to use the thumbnail
$thumbnailUrl="https://lazydev.sharepoint.com/websites/OrganizationAssets/Sharedpercent20Documents/company-branding-thumb.png"

Add-SPOOrgAssetsLibrary -LibraryUrl $brandingLibraryUrl -ThumbnailURL $thumbnailUrl -OrgAssetType ImageDocumentLibrary -CdnType Non-public -Verify:$false

Checking Current Asset Libraries

If you wish to know if there are already present asset libraries in your group, then you should utilize the Get-SPOOrgAssetsLibrary cmdlet to get an summary of all of the libraries. Needless to say you’ll be able to solely use one SharePoint website for the asset libraries.

Get-SPOOrgAssetsLibrary

Utilizing PnPOnline

You may as well use PnPOnline to create the asset libraries. One of many benefits of PnPOnline is that it really works with PowerShell 7 with out the necessity for importing the module:

$siteURL = 'https://lazydev.sharepoint.com/websites/OrganizationAssets';
$brandingLibraryUrl = "https://lazydev.sharepoint.com/websites/OrganizationAssets/Officepercent20Templates"

Join-PnPOnline $siteURL -Interactive

# add Group Asset Library
Add-PnPOrgAssetsLibrary -LibraryUrl $brandingLibraryUrl -OrgAssetType OfficeTemplateLibrary

Utilizing the Group Belongings Library

After you could have configured every part, the group property library can be accessible in SharePoint On-line and Workplace. The latter can take as much as 24 hours, however the picture libraries are sometimes instantly accessible in SharePoint On-line.

For instance, once you add a brand new Picture internet half to a SharePoint web page, you’ll now see the choice Your group with the picture library(ies) that you’ve got created:

SharePoint organization assets library

To make use of the templates in PowerPoint On-line, for instance, you’ll need to click on on See extra themes after you could have opened PowerPoint.

Within the desktop model of PowerPoint, you will see the corporate templates below New. Right here you will notice a brand new tab with the title of your group. Click on on it to see all the corporate templates.

Wrapping Up

The group’s asset library is an effective way to provide your workers entry to firm sources, like PowerPoint templates. The picture library is sadly solely accessible in SharePoint On-line. It will have been nice if we may use that additionally as a supply to insert photographs from in Phrase or PowerPoint.

Needless to say it might probably take as much as 24 hours or much more for the templates to point out up within the desktop purposes.

Hope you preferred this text, you probably have any questions, simply drop a remark beneath.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments