locked
Start User Profile Synchronization Incremental with PowerShell RRS feed

Answers

  • Thanks Trevor,

    Finally created the task scheduled with this command:

    Sync Incremental

    Add-PsSnapin Microsoft.SharePoint.PowerShell
    $UPS= Get-SPServiceApplication | where { $_.DisplayName -eq “User Profile Service Application”}
    $UPS.StartImport($false)

    And, create another task scheduler for Full Synchronization with this command:

    Sync FULL

    Add-PsSnapin Microsoft.SharePoint.PowerShell
    $UPS= Get-SPServiceApplication | where { $_.DisplayName -eq “User Profile Service Application”}
    $UPS.StartImport($true)

    Thanks...


    Gaby

    • Marked as answer by Gabyamenta Wednesday, February 4, 2015 4:17 PM
    Wednesday, February 4, 2015 9:27 AM
  • You would want to use $UPS.StartImport($false) - $true is Full Sync, $false is Incremental Sync.

    Trevor Seward

    Follow or contact me at...
      

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    • Proposed as answer by Ivan Yankulov Tuesday, February 3, 2015 8:24 PM
    • Marked as answer by Gabyamenta Wednesday, February 4, 2015 9:12 AM
    Tuesday, February 3, 2015 5:13 PM

All replies

  • Hi,

    The Incremental Sync is triggered by TimerJob "User Profile Service Application - User Profile Incremental Synchronization". You can see it yourself when you to "Configure Synchronization Timer Job".

    You can set the time to run there. Or you can set up a scheduled task to run a script that will start the job.

    Get-SPTimerJob | Where {$_.DisplayName -eq "User Profile Service Application - User Profile Incr
    emental Synchronization"} | Start-SPTimerJob

    • Proposed as answer by Ivan Yankulov Tuesday, February 3, 2015 2:21 PM
    • Unproposed as answer by Ivan Yankulov Tuesday, February 3, 2015 6:59 PM
    Tuesday, February 3, 2015 2:19 PM
  • With this command is executed Full Sync.

    Get-SPTimerJob | Where {$_.DisplayName -eq "User Profile Service Application - User Profile Incr
    emental Synchronization"} | Start-SPTimerJob

    I'm need execute Incremental Sync.

    I could run this command?

    Add-PsSnapin Microsoft.SharePoint.PowerShell
    $UPS= Get-SPServiceApplication | where { $_.DisplayName -eq “User Profile Service Application”}
    $UPS.StartImport($true)

    Thanks


    Gaby


    • Edited by Gabyamenta Tuesday, February 3, 2015 4:23 PM
    Tuesday, February 3, 2015 4:23 PM
  • You would want to use $UPS.StartImport($false) - $true is Full Sync, $false is Incremental Sync.

    Trevor Seward

    Follow or contact me at...
      

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    • Proposed as answer by Ivan Yankulov Tuesday, February 3, 2015 8:24 PM
    • Marked as answer by Gabyamenta Wednesday, February 4, 2015 9:12 AM
    Tuesday, February 3, 2015 5:13 PM
  • Hi,

    Thanks for your replay Trevor as always it is right in the spot!

    However If you start the "User Profile Service Application - User Profile Incremental Synchronization" manually, normally it should  start DELTASYNC for all connection that are finished in success last time.

    Is this correct? Is there a difference if we run the StartImport method on the UPSA?

    BR,

    Ivan

    Tuesday, February 3, 2015 6:59 PM
  • Yes, incremental uses the Delta steps. The StartImport just runs the timer job.

    Trevor Seward

    Follow or contact me at...
      

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.


    Tuesday, February 3, 2015 6:59 PM
  • Thanks Trevor,

    Finally created the task scheduled with this command:

    Sync Incremental

    Add-PsSnapin Microsoft.SharePoint.PowerShell
    $UPS= Get-SPServiceApplication | where { $_.DisplayName -eq “User Profile Service Application”}
    $UPS.StartImport($false)

    And, create another task scheduler for Full Synchronization with this command:

    Sync FULL

    Add-PsSnapin Microsoft.SharePoint.PowerShell
    $UPS= Get-SPServiceApplication | where { $_.DisplayName -eq “User Profile Service Application”}
    $UPS.StartImport($true)

    Thanks...


    Gaby

    • Marked as answer by Gabyamenta Wednesday, February 4, 2015 4:17 PM
    Wednesday, February 4, 2015 9:27 AM