-
Notifications
You must be signed in to change notification settings - Fork 108
SPUserProfileSection
Brian Farnhill edited this page Dec 9, 2016
·
18 revisions
Parameters
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
| Name | Key | string | The internal name of the user profile section | |
| Ensure | Write | string | Present if the section should exist, absent if it should be removed | Present, Absent |
| UserProfileService | Required | string | The name of the user profile service application this section exists in | |
| DisplayName | Write | string | The display name of the section | |
| DisplayOrder | Write | uint32 | A number used to sort sections by | |
| InstallAccount | Write | String | POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5 |
This resource will create a section in a user profile service application. It creates, update or delete a section using the parameters that are passed in to it.
If no DisplayOrder is added then SharePoint will automatically assigned an ID
Examples
Example 1
This example adds a new section for profile properties to the specified user profile service app
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost {
SPUserProfileSection PersonalInformationSection
{
Name = "PersonalInformationSection"
UserProfileService = "User Profile Service Application"
DisplayName = "Personal Information"
DisplayOrder = 5000
Ensure = "Present"
PsDscRunAsCredential = $SetupAccount
}
}
}

- Home
- Getting Started
- Pre-requisites
- Installing the module
- Exporting SharePoint Configuration
- Creating Configuration Files
- Pre-created Examples
- Creating an Azure development environment
- Understanding Resources & Syntax
- Remote PowerShell Authentication
- Contributing to SharePointDsc
- Other useful modules for SharePoint DSC configurations