-
Notifications
You must be signed in to change notification settings - Fork 109
SPUserProfileSyncConnection
Brian Farnhill edited this page Jul 3, 2017
·
19 revisions
Parameters
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
| Name | Key | string | The name of the connection | |
| Forest | Required | string | The name of the AD forest to read from | |
| UserProfileService | Required | string | The name of the user profile service that this connection is attached to | |
| ConnectionCredentials | Required | string | The credentials to connect to Active Directory with | |
| IncludedOUs | Required | string | A list of the OUs to import users from | |
| ExcludedOUs | Write | string | A list of the OUs to ignore users from | |
| Server | Write | string | The specific AD server to connect to | |
| UseSSL | Write | boolean | Should SSL be used for the connection | |
| Force | Write | boolean | Set to true to run the set method on every call to this resource | |
| ConnectionType | Write | string | The type of the connection - currently only Active Directory is supported | ActiveDirectory, BusinessDataCatalog |
| InstallAccount | Write | string | POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5 |
This resource will ensure a specifc user profile sync connection is in place and that it is configured accordingly to its definition
This resource currently supports AD only.
Examples
Example 1
This example adds a new user profile sync connection to the specified user profile service app
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount,
[Parameter(Mandatory = $true)]
[PSCredential]
$ConnectionAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost {
SPUserProfileSyncConnection MainDomain
{
UserProfileService = "User Profile Service Application"
Forest = "contoso.com"
Name = "Contoso"
ConnectionCredentials = $ConnectionAccount
Server = "server.contoso.com"
UseSSL = $false
IncludedOUs = @("OU=SharePoint Users,DC=Contoso,DC=com")
ExcludedOUs = @("OU=Notes Usersa,DC=Contoso,DC=com")
Force = $false
ConnectionType = "ActiveDirectory"
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