Skip to main content

Sync-IMLibrary

SYNOPSIS

Initiates a library synchronization scan job in Immich.

SYNTAX

list (Default)

Sync-IMLibrary [-Session <ImmichSession>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

id

Sync-IMLibrary [-Session <ImmichSession>] -Id <String[]> [-ProgressAction <ActionPreference>]
[<CommonParameters>]

DESCRIPTION

The Sync-IMLibrary function starts a library scan job that synchronizes the Immich library with the file system. This process discovers new assets, updates metadata for existing assets, and ensures the library reflects the current state of the monitored directories.

The function supports different scan modes: refreshing all files for a complete rescan, or refreshing only modified files for incremental updates. By default, only modified files are scanned for efficiency.

EXAMPLES

EXAMPLE 1

Sync-IMLibrary -Id 'bf973405-3f2a-48d2-a687-2ed4167164be'

Starts a library synchronization scan for the specified library using default settings (incremental scan of modified files only).

EXAMPLE 2

Sync-IMLibrary -Id 'bf973405-3f2a-48d2-a687-2ed4167164be' -RefreshAllFiles

Performs a complete rescan of all files in the specified library.

EXAMPLE 3

Get-IMLibrary | Sync-IMLibrary

Synchronizes all libraries by processing library objects from the pipeline.

EXAMPLE 4

$libraryIds = @('bf973405-3f2a-48d2-a687-2ed4167164be', '9c4e0006-3a2b-4967-94b6-7e8bb8490a12')
$libraryIds | Sync-IMLibrary -RefreshAllFiles

Performs complete rescans on multiple libraries specified by ID.

PARAMETERS

-Session

Optionally define a immich session object to use. This is useful when you are connected to more than one immich instance.

-Session $Session

Type: ImmichSession
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id

Specifies the unique identifier of the library to synchronize. Must be a valid GUID format. Accepts pipeline input by value and by property name for batch synchronization operations.

Type: String[]
Parameter Sets: id
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

Library synchronization jobs run in the background. Use Get-IMJob to monitor the progress and status of initiated scan operations.

EDIT THIS DOC

This page was auto-generated from the powershell command comment based help. To edit the content of this page, update the script file comment based help on github Github