Created
May 30, 2022 19:13
-
-
Save burki169/9f075b473ce0e36aa5ee59117e388440 to your computer and use it in GitHub Desktop.
Sitecore Items Without a Language Version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$props = @{ | |
Parameters = @( | |
@{Name="rootItem"; Title="Root Item"; editor="droptree"; Root="/sitecore/"}) | |
Title = "Choose Root Item" | |
Description = "" | |
Width = 400 | |
Height = 200 | |
ShowHints = $true | |
} | |
Read-Variable @props > $null | |
if ($rootItem -ne $null -and ![string]::IsNullOrEmpty($rootItem.ItemPath)) | |
{ | |
$items = Get-ChildItem -Path $rootItem.ItemPath -Recurse | Where-Object { | |
$_.Versions.GetVersions($true).Count -eq 0 } |` | |
%{ | |
[PSCustomObject]@{ | |
"ID" = $_.ID | |
"ItemName" = $_.Name | |
"Item" = $_ | |
"ItemPath" = $_.Paths.Path | |
} | |
} | |
$dlgProps = @{ | |
Title = "Items with no version" | |
PageSize = 25 | |
} | |
$items | Show-ListView @dlgProps -Property @{Label="Icon"; Expression={$_.__Icon} }, @{Label="Path"; Expression={$_.ItemPath} } | |
Close-Window | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment