About Help

Choose a topic from the list on the left or search for a specific topic. Choose a topic from the list or search for a specific topic.
Cmdlets  Providers  Aliases  Modules
 

about_SPUserProfileSyncService

Spuserprofilesyncservice

SharePointDSC
 

SHORT DESCRIPTION

 

.NAME

    SPUserProfileSyncService 
 
# Description 
     
    This resource is responsible for ensuring that the user profile sync service 
    has been provisioned (Ensure = "Present") or is not running (Ensure = 
    "Absent") on the current server. This resource uses the InstallAccount to 
    validate the current state only, the set method which will do the provisioning 
    uses the FarmAccount to do the actual work - this means that CredSSP 
    authentication will need to be permitted to allow a connection to the local 
    server. 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 FarmAccount 
    credential to the local administrators group at the beginning of the set 
     
.PARAMETER UserProfileServiceAppName 
    Key - string 
    The name of the user profile service for this sync instance 
 
.PARAMETER Ensure 
    Write - string 
    Allowed values: Present, Absent 
    Present to ensure the service is running, absent to ensure it is not 
 
.PARAMETER FarmAccount 
    Required - String 
    The farm account, which is needed to provision the service app 
 
.PARAMETER RunOnlyWhenWriteable 
    Write - Boolean 
    Should the sync service only run when the user profile database is in a writeable state? 
 
.PARAMETER InstallAccount 
    Write - String 
    POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5 
 
 

.EXAMPLE

    This example provisions the user profile sync service to the local server 
 
 
    Configuration Example  
    { 
        param( 
            [Parameter(Mandatory = $true)] 
            [PSCredential] 
            $SetupAccount, 
 
            [Parameter(Mandatory = $true)] 
            [PSCredential] 
            $FarmAccount 
        ) 
        Import-DscResource -ModuleName SharePointDsc 
 
        node localhost { 
            SPUserProfileSyncService UserProfileSyncService 
            {   
                UserProfileServiceAppName   = "User Profile Service Application" 
                Ensure                      = "Present" 
                FarmAccount                 = $FarmAccount 
                RunOnlyWhenWriteable        = $true 
                InstallAccount              = $SetupAccount 
            } 
        } 
    }