I need to find media items that has no references, but user should have an option to delete them manually . by some reason, if I add an item to custom noRefeItems, Show-ListView component does not show delete action. how to fix it?

$noRefeItems = [System.Collections.ArrayList]@()
    $itemsToProcess = Get-ChildItem -Path  $root.ProviderPath -Recurse | Where-Object { $_.TemplateName -eq 'Image' }
    if ($itemsToProcess -ne $null) {
        $itemsToProcess | ForEach-Object {
            $referrers = Get-ItemReferrer -Item $_ | measure
            if ($referrers.Count -gt 0) {
            } else {
    $noRefeItems | Show-ListView -Property DisplayName, ProviderPath, Size, Created

1 Answer 1


Delete buttons do not exist in reports by default. If you wish to add your own custom report actions then you can following the documentation described here. You can make the action do whatever you want, such as delete the item and send an email.

The training module included with SPE provides an example report action.

Content Tree

The Advanced Report example demonstrates the "Say Hello" button.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.