Skip to main content

Search-IMAsset

SYNOPSIS​

Searches assets using metadata filters or AI-based smart search.

SYNTAX​

Metadata (Default)​

Search-IMAsset [-Session <ImmichSession>] [-Smart] [-Order <String>] [-WithPeople <Boolean>]
[-WithStacked <Boolean>] [-WithEXIF <Boolean>] [-Size <Int32>] [-City <String>] [-Country <String>]
[-State <String>] [-Make <String>] [-Model <String>] [-LensModel <String>] [-Checksum <String>]
[-EncodedVideoPath <String>] [-Id <String>] [-LibraryId <String>] [-OCR <String>] [-OriginalFileName <String>]
[-OriginalPath <String>] [-Rating <Int32>] [-Visibility <String>] [-Type <String>] [-IsEncoded <Boolean>]
[-IsFavorite <Boolean>] [-IsMotion <Boolean>] [-IsOffline <Boolean>] [-IsNotInAlbum] [-AlbumIds <String[]>]
[-PersonIds <String[]>] [-TagIds <String[]>] [-CreatedAfter <DateTime>] [-CreatedBefore <DateTime>]
[-TakenAfter <DateTime>] [-TakenBefore <DateTime>] [-UpdatedAfter <DateTime>] [-UpdatedBefore <DateTime>]
[-TrashedAfter <DateTime>] [-TrashedBefore <DateTime>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]

Smart​

Search-IMAsset [-Session <ImmichSession>] [-Smart] -Query <String> [-Language <String>] [-WithEXIF <Boolean>]
[-Size <Int32>] [-City <String>] [-Country <String>] [-State <String>] [-Make <String>] [-Model <String>]
[-LensModel <String>] [-Checksum <String>] [-EncodedVideoPath <String>] [-Id <String>] [-LibraryId <String>]
[-OCR <String>] [-OriginalFileName <String>] [-OriginalPath <String>] [-Rating <Int32>] [-Visibility <String>]
[-Type <String>] [-IsEncoded <Boolean>] [-IsFavorite <Boolean>] [-IsMotion <Boolean>] [-IsOffline <Boolean>]
[-IsNotInAlbum] [-AlbumIds <String[]>] [-PersonIds <String[]>] [-TagIds <String[]>] [-CreatedAfter <DateTime>]
[-CreatedBefore <DateTime>] [-TakenAfter <DateTime>] [-TakenBefore <DateTime>] [-UpdatedAfter <DateTime>]
[-UpdatedBefore <DateTime>] [-TrashedAfter <DateTime>] [-TrashedBefore <DateTime>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION​

By default, searches asset metadata using the Immich metadata search. Filter parameters are sent in the SearchFilter object. Multiple values for the AlbumIds, PersonIds and TagIds parameters match assets that have any of the given values.

With -Smart, uses machine learning to find assets by visual content, faces, objects and OCR text. Smart search requires -Query. Results depend on model accuracy.

Date parameters are inclusive: CreatedAfter, TakenAfter, UpdatedAfter and TrashedAfter match values on or after the date; the *Before parameters match values on or before the date.

EXAMPLES​

EXAMPLE 1​

Search-IMAsset -Type VIDEO -IsFavorite $true

Returns favorite videos using metadata search.

EXAMPLE 2​

Search-IMAsset -Smart -Query 'Road'

Searches for assets matching the content 'Road' using smart search.

EXAMPLE 3​

Search-IMAsset -OCR 'birthday party'

Finds photos containing 'birthday party' text.

PARAMETERS​

-Session​

Optional session object for multi-instance connections.

Type: ImmichSession
Parameter Sets: (All)
Aliases:

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

-Smart​

Uses smart (AI) search instead of metadata search. Requires -Query.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Query​

Natural-language query for smart search. Only valid with -Smart.

Type: String
Parameter Sets: Smart
Aliases: SearchString

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

-Language​

Language of the smart search query. Only valid with -Smart.

Type: String
Parameter Sets: Smart
Aliases:

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

-Order​

Sort direction for metadata search: asc or desc. Not valid with -Smart.

Type: String
Parameter Sets: Metadata
Aliases:

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

-WithPeople​

Include people in the results. Metadata search only.

Type: Boolean
Parameter Sets: Metadata
Aliases:

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

-WithStacked​

Include stacked assets in the results. Metadata search only.

Type: Boolean
Parameter Sets: Metadata
Aliases:

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

-WithEXIF​

Include EXIF data in the results.

Type: Boolean
Parameter Sets: (All)
Aliases:

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

-Size​

Number of items per page of results sent to the server.

Type: Int32
Parameter Sets: (All)
Aliases:

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

-City​

Filter by city name.

Type: String
Parameter Sets: (All)
Aliases:

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

-Country​

Filter by country name.

Type: String
Parameter Sets: (All)
Aliases:

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

-State​

Filter by state name.

Type: String
Parameter Sets: (All)
Aliases:

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

-Make​

Filter by camera make.

Type: String
Parameter Sets: (All)
Aliases:

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

-Model​

Filter by camera model.

Type: String
Parameter Sets: (All)
Aliases:

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

-LensModel​

Filter by lens model.

Type: String
Parameter Sets: (All)
Aliases:

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

-Checksum​

Filter by file checksum.

Type: String
Parameter Sets: (All)
Aliases:

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

-EncodedVideoPath​

Filter by encoded video path.

Type: String
Parameter Sets: (All)
Aliases:

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

-Id​

Filter by asset id.

Type: String
Parameter Sets: (All)
Aliases:

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

-LibraryId​

Filter by library id.

Type: String
Parameter Sets: (All)
Aliases:

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

-OCR​

Search text extracted from images via OCR.

Type: String
Parameter Sets: (All)
Aliases:

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

-OriginalFileName​

Filter by original file name.

Type: String
Parameter Sets: (All)
Aliases:

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

-OriginalPath​

Filter by original file path.

Type: String
Parameter Sets: (All)
Aliases:

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

-Rating​

Filter by rating, from -1 to 5.

Type: Int32
Parameter Sets: (All)
Aliases:

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

-Visibility​

Asset visibility: archive, timeline, hidden, or locked.

Type: String
Parameter Sets: (All)
Aliases:

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

-Type​

Asset type: IMAGE, VIDEO, AUDIO or OTHER.

Type: String
Parameter Sets: (All)
Aliases:

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

-IsEncoded​

Filter by video encoding status.

Type: Boolean
Parameter Sets: (All)
Aliases:

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

-IsFavorite​

Filter by favorite status.

Type: Boolean
Parameter Sets: (All)
Aliases:

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

-IsMotion​

Filter by motion photo status.

Type: Boolean
Parameter Sets: (All)
Aliases:

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

-IsOffline​

Filter by offline status.

Type: Boolean
Parameter Sets: (All)
Aliases:

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

-IsNotInAlbum​

Filter to assets that are in no album ($true) or in at least one album ($false).

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-AlbumIds​

Match assets in any of the given album ids.

Type: String[]
Parameter Sets: (All)
Aliases:

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

-PersonIds​

Match assets containing any of the given person ids.

Type: String[]
Parameter Sets: (All)
Aliases:

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

-TagIds​

Match assets with any of the given tag ids.

Type: String[]
Parameter Sets: (All)
Aliases:

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

-CreatedAfter​

Include assets created on or after this date.

Type: DateTime
Parameter Sets: (All)
Aliases:

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

-CreatedBefore​

Include assets created on or before this date.

Type: DateTime
Parameter Sets: (All)
Aliases:

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

-TakenAfter​

Include assets taken on or after this date.

Type: DateTime
Parameter Sets: (All)
Aliases:

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

-TakenBefore​

Include assets taken on or before this date.

Type: DateTime
Parameter Sets: (All)
Aliases:

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

-UpdatedAfter​

Include assets updated on or after this date.

Type: DateTime
Parameter Sets: (All)
Aliases:

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

-UpdatedBefore​

Include assets updated on or before this date.

Type: DateTime
Parameter Sets: (All)
Aliases:

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

-TrashedAfter​

Include assets trashed on or after this date.

Type: DateTime
Parameter Sets: (All)
Aliases:

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

-TrashedBefore​

Include assets trashed on or before this date.

Type: DateTime
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
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​

Smart search requires machine learning models to be enabled and trained.

EDIT THIS DOC​

This page was auto-generated from PowerShell comment-based help. To edit this page, update the corresponding command help in the module source repository.