Synopsis
Merge a directory of snippets.
Syntax
Merge-PropertyRules [-SourceDirectory] <String> [-DefaultRuleFilename <String>] [-OutputToFile]
[-OutputFileName <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Description
Merges a snippets directory and outputs it to the PSCustomObject
or a single JSON file using the -OutputToFile
parameter and optionally the -OutputFilename
parameter.
You also need to provide the -SourceDirectory
parameter and optionally the -DefaultRuleFilename
parameter, which defaults to main.json
.
Parameters
-DefaultRuleFilename
JSON file containing the default rule of your property.
Defaults to 'main.json'.
Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-OutputFileName
JSON filename to save the retrieved rule tree.
Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-OutputToFile
Output rule tree as a single JSON file.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-SourceDirectory
Source directory to read JSON snippets from.
Type: String
Parameter Sets: (All)
Aliases: None
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common Parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
None
Outputs
System.Object