Содержание
# SPOHomeSite
Parameters
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
IsSingleInstance | Key | String | Specifies the resource is a single instance, the value must be 'Yes' | Yes |
Url | Write | String | The URL of the home site collection | |
Ensure | Write | String | Present ensures the site collection is registered as home site, absent ensures it is unregistered | Present, Absent |
Credential | Write | PSCredential | Credentials of the account to authenticate with. | |
ApplicationId | Write | String | Id of the Azure Active Directory application to authenticate with. | |
ApplicationSecret | Write | String | Secret of the Azure Active Directory application to authenticate with. | |
TenantId | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | |
CertificatePassword | Write | PSCredential | Username can be made up to anything but password will be used for certificatePassword | |
CertificatePath | Write | String | Path to certificate used in service principal usually a PFX file. | |
CertificateThumbprint | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. |
Description
This resource allows administrators to configure a Site Collection as the Home Site of the tenant. The menu of this SharePoint Site Collection will be shown on SharePoint Home.
NOTE: This setting is not applied immediately and can take several hours to be fully available within the tenant. Please use this resource with caution, as a direct test run can lead to incorrect status results. For more details about setting the home site, go to> aka.ms/homesites
Azure AD Permissions
To authenticate via Azure Active Directory, this resource required the following Application permissions:
- Automate
- SharePoint
- Sites.FullControl.All
- SharePoint
- Export
- SharePoint
- Sites.FullControl.All
- SharePoint
NOTE: All permisions listed above require admin consent.
Examples
Example 1
This example is used to test new resources and showcase the usage of new resources being worked on. It is not meant to use as a production baseline.
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$credsGlobalAdmin
)
Import-DscResource -ModuleName Microsoft365DSC
node localhost
{
SPOHomeSite "SetMarketingSiteCollectionAsHomeSite"
{
IsSingleInstance = "Yes"
Url = "https://office365dsc.sharepoint.com/sites/Marketing"
Ensure = "Present"
Credential = $credsGlobalAdmin
}
}
}