Using PowerShell scripts with password synchronization
Optionally, you can configure the to run your custom PowerShell script before, after, or instead of the password synchronization operation. To do so, create a connection handler. For instructions, see Using connection handlers.
Example of a PowerShell script run after password synchronization
After the password synchronization is complete, the following script sends a notification email message informing the administrator that the specified object password has been modified in the target connected system. The message provides the names of the source Active Directory object and its counterpart in the target connected system.
#---- Specify the SMTP Server name in your organization ----
$SmtpServer = "smtpServerName"
$smtp = new-object system.net.mail.smtpClient($SmtpServer)
$mail = new-object System.Net.Mail.MailMessage
# ---- Set the sender mail ----
$mail.From = "yourmail@mydomain.com"
# ---- Set the destination mail ----
$mail.To.Add("Administrator@mydomain.com")
# --- Specify the message subject ----
$mail.Subject = "Password was changed"
# ---- Set the message text ----
$body = "The passwords were synchronized for the following object pair: "
$body = $body + $srcObj.Name + "->" + $dstObj.Name
$mail.Body = $body
# ---- Send mail ----
$smtp.Send($mail)
Synchronization history
provides the Synchronization History option that allows you to view the details of completed synchronization workflow runs, password synchronization rule runs, and map and unmap operations.
The synchronization history also helps you troubleshoot synchronization issues by providing information on the errors that were encountered during sync workflow runs, password sync rule runs, or map and unmap operations.
You can also selectively clean up entries from the synchronization history.
To access the synchronization history, use the Sync History tab in the .
Viewing sync workflow history
You can use the Sync History tab in the to view a list of completed sync workflow runs.
This list provides information on:
-
The names of completed synchronization workflows.
-
The dates when each sync workflow run started and completed.
-
Which instance was used to run each synchronization workflow.
You can click a sync workflow run entry in the list to view detailed information about the sync workflow steps that were run, objects that participated in that run, and errors encountered during the run, if any.
To view the details of a completed sync workflow run
- In the Console, click the Sync History tab.
-
Click Sync Workflow History.
-
If you want to filter the list of completed sync workflows, use the following elements:
-
Show items completed: Use this element to specify the time period when the sync workflows you want to view completed.
-
Maximum number of items to show: Specify the maximum number of completed sync workflows you want to view.
You can sort the list of completed sync workflows by clicking the column titles in the list. Also you can filter the list of completed sync workflows by typing keywords in the text boxes provided below the column titles.
- To view detailed information about a list item, select the list item and after that click Details.
The details provided for each list entry look similar to the following:
Figure 22: Synchronization Servce details
To view detailed information about the objects that belong to a certain object category, click the number displayed next to the object category name in the Source or Target column.
To view detailed information about encountered errors, click the link displaying the number of errors.
View mapping history
You can use the Sync History tab in the to view the detailed information about a particular completed map or unmap operation. By doing so, you can view a list of attributes for each object that participated in the map or unmap operation.
To view the details of a mapped pair of objects
- In the Console, click the Sync History tab.
-
Click Mapping History.
-
If you want to filter the list of completed map and unmap operations, use the following elements:
-
Show items completed: Specify a time period when the map and unmap operations you want to view completed.
-
Maximum number of items to show: Specify the maximum number of completed map and unmap operations you want to view.
You can sort the list of map and unmap operations by clicking the column titles. Also you can filter the list of map and unmap operations by typing keywords in the text boxes provided below the column titles.
- To view detailed information about a list item, select the list item and after that click Details.