Test-Rule
Tests item against a sitecore serialized rules engine rule set.
Syntax
Test-Rule [-Rule <String>] [-InputObject <PSObject>] [-RuleDatabase <String>]
Detailed Description
Tests item or a stream of items against a sitecore serialized rules engine rule set.
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
Parameters
-Rule <String>
Serialized sitecore rules engine rule. Such rules can be read from rule fields or created by user with the Read-Variable cmdlet.
Required?
false
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-InputObject <PSObject>
Item to be tested
Required?
false
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-RuleDatabase <String>
Name of the database from which rules are pulled.
Required?
false
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Sitecore.Data.Items.Item
Outputs
The output type is the type of the objects that the cmdlet emits.
System.Boolea
Notes
Help Author: Adam Najmanowicz, Michael West
Examples
EXAMPLE 1
Specifies a rule as "items that have layout" and runs the rule againste all items under the ome Item
EXAMPLE 2
Asks user for the rule and root under which items should be filtered, and lists all items fulfilling the rule under the selected path
Related Topics
Last updated