Site
|
|
The template STS#3 indicates a Team Site with no connection to an Office365 Group.
Other populair template code are:
| Code | Title | Description |
|---|---|---|
| STS#0 | Team Site (Classic) | A site with a classic experience |
| STS#1 | Blank Site | A blank site for you to customize based on your requirements |
| STS#3 | Blank Site | A site with no connection to an Microsoft 365 Group |
| GROUP#0 | Team Site | A team site connected to an Microsoft 365 Group |
| SITEPAGEPUBLISHING#0 | Communication Site | Publish dynamic, beautiful content to people in your organization to keep them informed and engaged |
| WIKI#0 | Wiki Site | A site for a community to brainstorm and share ideas |
| PROJECTSITE#0 | Project Site | A site for managing and collaborating on a project |
| BLANKINTERNET#0 | Publishing Site | This template creates a site for publishing Web pages on a schedule, with workflow features enabled |
| SPSNHOME#0 | News Site | A site for publishing news articles and links to news articles |
The following templates are using a combination of entitites to create a basic site type.
- Classic Teamsite
- Subsite
- Office 365 Group
- Microsoft Team (Requires Make 5.0 or above)
- Microsoft Team with private channel (Requires Make 6.2 or above)
- Modern teamsite (without Office 365 group)
- Modern communication site
Site Properties
There are numerous properties that you can define on site level. In this chapter you see examples on how to apply those site properties.
-
Connect your site collection to a hubsite
If you would like to associate a hubsite to your (new) SharePoint site collection, you need to add the entity “HubSiteUrl” to the “Site” tag. The value of the entity “HubSiteUrl” would be the address of the HubSite. It would look something like this in your Make template:
1<Site Url="{ββββββurl}ββββββ" Title="{βββββββββββββtitle}βββββββββββββ" OwnerLogin="{βββββββββββββsiteowner}βββββββββββββ" Template="STS#3" LCID="1033" StorageQuota="1024" TimeZoneId="4" HubSiteUrl="https://wmeurer.sharepoint.com/sites/hub">AnΒ example of a template can be found here. Of course you need to change the value of the hubsite to your own hubsite.
-
Promote site as hubsite
It is possible to promote a site collection as hubsite via PowerShell. This can also be done via provisioning. In your Make template you need to add the property “IsHubSite” to the “Site” entity. It will look like this:
1<Site Url="{βββββββββββββββββββββββurl}βββββββββββββββββββββββ" Title="{βββββββββββββββββββββββtitle}βββββββββββββββββββββββ" OwnerLogin="{βββββββββββββββββββββββsiteowner}βββββββββββββββββββββββ" Template="STS#3" LCID="1033" StorageQuota="1024" TimeZoneId="4"Β IsHubSite="True"> -
Configure version limit policy (site-level)
Version limit policies control how many document versions SharePoint keeps in your libraries. Setting a policy at site level means you only need to configure it once. It is then automatically applied to new document libraries on that site.
The following attributes are available at site level:
Attribute Type Description InheritVersionPolicyFromTenantbool Clears the site-level version policy so that new document libraries inherit the tenant-level setting. Cannot be combined with any other version attribute. EnableAutoExpirationVersionTrimbool When true, SharePoint automatically manages version history limits using a built-in algorithm that thins out intermittent older versions while preserving high-value ones. Whenfalse, limits must be set manually viaMajorVersions, andExpireVersionsAfterDays.ExpireVersionsAfterDaysint Days to retain a version. Use 0to never expire by time, or30or more to delete versions older than that many days. Required whenEnableAutoExpirationVersionTrim="false".MajorVersionsint Maximum number of major versions to keep. Required when EnableAutoExpirationVersionTrim="false".Inherit from Tenant
Use the version policy that your Microsoft 365 administrator has configured at tenant level. This is the right choice when your organisation has a central IT policy and you want this site to follow it automatically. No other version attributes may be set alongside
InheritVersionPolicyFromTenant.1<Site Url="{url}" Title="{title}" OwnerLogin="{owner}" Template="STS#3" InheritVersionPolicyFromTenant="true">Auto Expiration
Let SharePoint automatically decide which old versions to clean up using its built-in expiration logic. This is the simplest option, you do not need to specify version counts or expiration days. Recommended when you do not have specific compliance or storage requirements.
1 2<Site Url="{url}" Title="{title}" OwnerLogin="{owner}" Template="STS#3" EnableAutoExpirationVersionTrim="true">Expire After (time-based retention)
Keep up to a set number of versions, but automatically delete versions that are older than a specified number of days. Use this when you want recent document history without accumulating old versions indefinitely. For example, keeping the last 500 versions from the past 180 days.
1 2 3 4<Site Url="{url}" Title="{title}" OwnerLogin="{owner}" Template="STS#3" EnableAutoExpirationVersionTrim="false" MajorVersions="500" ExpireVersionsAfterDays="180">No Expiration (count-based retention only)
Keep a fixed number of versions indefinitely. Versions are deleted only when the count exceeds the configured limit, and never on a time basis. Use this for compliance or record-keeping scenarios where you need a predictable version history that is never automatically expired by age.
1 2 3 4<Site Url="{url}" Title="{title}" OwnerLogin="{owner}" Template="STS#3" EnableAutoExpirationVersionTrim="false" ExpireVersionsAfterDays="0" MajorVersions="500"> -
Configure sensitivity labels
You can now assign Microsoft Purview sensitivity labels to SharePoint site by specifying the label GUID via the SensitivityLabelId attribute.
Add / update sensitivity label
1<Site Title="{Title}" Url="{url}" Template="STS#3" LCID="1033" OwnerLogin="{owner}" ObjectAction="Create" SharingCapability="ExternalUserSharingOnly" DenyAddAndCustomizePages="Disabled" SensitivityLabelId="43cd7698-7325-4b15-88ac-21ad1ba1e320">Remove sensitivity label
1<Site Title="{Title}" Url="{url}" Template="STS#3" LCID="1033" OwnerLogin="{owner}" ObjectAction="Create" SharingCapability="ExternalUserSharingOnly" DenyAddAndCustomizePages="Disabled" SensitivityLabelId="">To get the Id of a sensitivity label, use the PnP PowerShell commandlet Get-PnPAvailableSensitivityLabel. Please see the PnP site for more information about this commandlet: Get-PnPAvailableSensitivityLabel | PnP PowerShell.