$rule = '<ruleset></ruleset>'
$root = Get-Item master:\content\home\
$result = Read-Variable -Parameters `
@{Name="root"; title="Items under"; Tooltip="Items under the selected item will be considered for evaluation"}, `
@{Name="rule"; Editor="rule"; title="Filter rules"; Tooltip="Only items conforming to this rule will be displayed."} `
-Description "This dialog shows editor how a rule can be taken from an item and edited using the Read-Variable cmdlet." `
-Title "Sample rule editing" -Width 600 -Height 600 -ShowHints
if($result -eq "cancel"){
Get-ChildItem $root.ProviderPath | ? { Test-Rule -InputObject $_ -Rule $rule -RuleDatabase master}