-
Notifications
You must be signed in to change notification settings - Fork 107
SPUserProfileServiceApp
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Name | Key | string | The name of the user profile service | |
ProxyName | Write | string | The proxy name, if not specified will be /Name of service app/ Proxy | |
ApplicationPool | Required | string | The name of the application pool to run the service app in | |
MySiteHostLocation | Write | string | The URL of the my site host collection | |
MySiteManagedPath | Write | string | The Managed Path of the my site sites | |
ProfileDBName | Write | string | The name of the profile database | |
ProfileDBServer | Write | string | The name of the server to host the profile database | |
SocialDBName | Write | string | The name of the social database | |
SocialDBServer | Write | string | The name of the database server to host the social database | |
SyncDBName | Write | string | The name of the sync database | |
SyncDBServer | Write | string | The name of the database server to host the sync database | |
EnableNetBIOS | Write | boolean | Whether Farm should resolve NetBIOS domain names | |
NoILMUsed | Write | boolean | Specifies if the service application should be configured to use AD Import | |
SiteNamingConflictResolution | Write | string | Specifies which SiteNamingConflictResolution should be used | Username_CollisionError, Username_CollisionDomain, Domain_Username |
Ensure | Write | string | Present if the service app should exist, absent if it should not | Present, Absent |
InstallAccount | Write | PSCredential | POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5 |
Type: Distributed Requires CredSSP: Yes
This resource will provision an instance of the user profile service to the farm. It creates the required databases using the parameters that are passed in to it (although these are only used during the initial provisioning).
The specified InstallAccount or PSDSCRunAsCredential cannot be the Farm Account. The resource will throw an error when it is.
To allow successful provisioning, the farm account must be in the local administrators group, however it is not best practice to leave this account in the Administrators group. Therefore this resource will add the Farm Account credential to the local administrators group at the beginning of the set method and remove it again later on.
The default value for the Ensure parameter is Present. When not specifying this parameter, the service application is provisioned.
The parameter SiteNamingConflictResolution accepts three values: Username_CollisionError, Username_CollisionDomain and Domain_Username. More information on each of these parameters can be found at: https://docs.microsoft.com/en-us/dotnet/api/microsoft.office.server.userprofiles.sitenameformat?view=sharepoint-server
NOTE: Due to the fact that SharePoint requires certain User Profile components to be provisioned as the Farm account, this resource and SPUserProfileSyncService retrieve the Farm account from the Managed Accounts. This does however mean that CredSSP is required, which has some security implications. More information about these risks can be found at: http://www.powershellmagazine.com/2014/03/06/accidental-sabotage-beware-of-credssp/
This example adds a new user profile service application to the local farm
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost {
SPUserProfileServiceApp UserProfileServiceApp
{
Name = "User Profile Service Application"
ApplicationPool = "SharePoint Service Applications"
MySiteHostLocation = "http://my.sharepoint.contoso.local"
MySiteManagedPath = "personal"
ProfileDBName = "SP_UserProfiles"
ProfileDBServer = "SQL.contoso.local\SQLINSTANCE"
SocialDBName = "SP_Social"
SocialDBServer = "SQL.contoso.local\SQLINSTANCE"
SyncDBName = "SP_ProfileSync"
SyncDBServer = "SQL.contoso.local\SQLINSTANCE"
EnableNetBIOS = $false
PsDscRunAsCredential = $SetupAccount
}
}
}
This example adds a new user profile service application to the local farm
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount,
[Parameter(Mandatory = $true)]
[PSCredential]
$FarmAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost {
SPUserProfileServiceApp UserProfileServiceApp
{
Name = "User Profile Service Application"
ApplicationPool = "SharePoint Service Applications"
MySiteHostLocation = "http://my.sharepoint.contoso.local"
MySiteManagedPath = "personal"
ProfileDBName = "SP_UserProfiles"
ProfileDBServer = "SQL.contoso.local\SQLINSTANCE"
SocialDBName = "SP_Social"
SocialDBServer = "SQL.contoso.local\SQLINSTANCE"
SyncDBName = "SP_ProfileSync"
SyncDBServer = "SQL.contoso.local\SQLINSTANCE"
EnableNetBIOS = $false
NoILMUsed = $true
PsDscRunAsCredential = $SetupAccount
}
}
}
This example adds a new user profile service application to the local farm
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount,
[Parameter(Mandatory = $true)]
[PSCredential]
$FarmAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost {
SPUserProfileServiceApp UserProfileServiceApp
{
Name = "User Profile Service Application"
ApplicationPool = "SharePoint Service Applications"
MySiteHostLocation = "http://my.sharepoint.contoso.local"
MySiteManagedPath = "personal"
ProfileDBName = "SP_UserProfiles"
ProfileDBServer = "SQL.contoso.local\SQLINSTANCE"
SocialDBName = "SP_Social"
SocialDBServer = "SQL.contoso.local\SQLINSTANCE"
SyncDBName = "SP_ProfileSync"
SyncDBServer = "SQL.contoso.local\SQLINSTANCE"
EnableNetBIOS = $false
SiteNamingConflictResolution = "Domain_Username"
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