> For the complete documentation index, see [llms.txt](https://help.security.gallagher.com/knowledge-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.security.gallagher.com/knowledge-hub/products/cc-software/configure/identity-solutions-cardholders-and-ope/active-directory/active-directory-sync-how-to-sync-new.md).

# Automate new Active Directory Sync images

Use a PowerShell script to trigger Active Directory Sync image updates from a CSV file.

AD Sync only replicates when a **change** occurs in AD (or CC). For images that already exist at initial sync but do not trigger an update, a **sample PowerShell script** forces the change: it clears the mapped AD attribute (default **`info`**) and re-fills it from a CSV, which makes AD Sync push the image to the cardholder.

> This script is a Tech Support aid, not a supported or final utility.

## Prerequisites

* The `info` attribute is configured as the Image Mapping attribute.
* A CSV of AD users (`sAMAccountName`, `objectGUID`, `objectSid`, or Distinguished Name) in the source directory.
* The running Windows Domain User can change the `info` attribute.

![AD Sync UI, Replication Group Image Mappings — AD attribute "info" mapped to a CC Image PDF, image type JPG, with a base image path](https://328339335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6bM8WhlBE9BYizPWJaPN%2Fuploads%2Fgit-blob-2489acc1d4b77ab2006f15d1fefd65e086c3e00a%2FSECHUB-AD-SYNC-07-image-mappings-config.png?alt=media)

## How it works

The script reads CSVs from `C:\ImageSyncScript\Source`, matches AD users, clears and re-fills `info`, moves the CSV to `Completed`/`Failed`, and logs to `C:\ImageSyncScript\Logs`. It can be scheduled via Task Scheduler.

Scripts: [ImageSyncScript for multiple inputs.ps1](https://github.com/GGLSecDev/gitbook-spaces/tree/main/tech-support/products/.gitbook/assets/SECHUB-AD-SYNC-image-sync-multiple-inputs.ps1), [ImageSyncScript for single input.ps1](https://github.com/GGLSecDev/gitbook-spaces/tree/main/tech-support/products/.gitbook/assets/SECHUB-AD-SYNC-image-sync-single-input.ps1).

***

🔗 **Related**

* [Sync - Features and Functions](/knowledge-hub/products/cc-software/configure/identity-solutions-cardholders-and-ope/active-directory/active-directory-sync-features-and-fun.md). How replication is triggered.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.security.gallagher.com/knowledge-hub/products/cc-software/configure/identity-solutions-cardholders-and-ope/active-directory/active-directory-sync-how-to-sync-new.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
