Skip to content

Extend Find-Item with most frequent criteria being accessible through accelerator parameters #1393

@AdamNaj

Description

@AdamNaj

In my last project I found myself needing the list of latest versions of items of certain template under a specific root.
While I have a cmdlet in the project for this now, I thought that this would be a worthy addition to the OOTB Find-Item Cmdlet.

The possible usage of Find-Item - that can be substitute as a blazing-fast and easy to use version of Get-ChildItem:

Find-Item `
    -Template "Foundation/SxaExtensions/_ScaffoldingCorporateHomePage" `
    -LatestVersion `
    -Path master:\templates | Initialize-Item

You may also notice that the -Index Parameter is missing as it is now optional. If it is not specified it will attempt to use the sitecore_{drive}_index or if not available - fall-back to sitecore_master_index so the most common scenario requires less code.

Those parameters can be mixed with other criteria.

Metadata

Metadata

Assignees

Labels

area-commandsInvolves functions and cmdlets.impact-behaviour-changeNothing to be worried about. Now even better than before!🌈 improvementExtra sugar and spice.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions