Answered by:
Start User Profile Synchronization Incremental with PowerShell

Question
-
I need start User profile Synchonitation incremental with powershell, or settings two different times.
For example:
daily between 01:00:00 and 01:00:00
and
daily between 13:00:00 and 13:00:00
For Start User Profile Synchronitation Full read this
https://gallery.technet.microsoft.com/office/Start-User-Profile-4a6a82a9
Thanks for your help
Gaby
Tuesday, February 3, 2015 12:32 PM
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 -
- 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 -
- 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 -
-
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