Last active
August 29, 2015 14:18
-
-
Save michaellwest/8f4cdf4dc0da0f9d9d46 to your computer and use it in GitHub Desktop.
Count the number of content items excluding certain templates.
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
# List of template ids to exclude from the count. | |
$templateIds = @( | |
"{29FD19B5-6F81-4829-B725-9C4279DA13CE}", | |
"{C3C9ED41-B476-49A9-B50C-FF8901665EA0}", | |
"{5A905A62-4898-44CE-96BA-EB3432BAAD91}" | |
) | |
@(Get-Item -Path master:\content\home) + @(Get-ChildItem -Path master:\content\home -Recurse) | | |
Where-Object { $templateIds -notcontains $_.TemplateId } | | |
Select-Object -Property Name, TemplateId | | |
Measure-Object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment