-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b3712b6
commit 20a0b7e
Showing
3 changed files
with
73 additions
and
1 deletion.
There are no files selected for viewing
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
71 changes: 71 additions & 0 deletions
71
docs/InternalFunctions/Set-PSCodeHealthPlaceholdersValue.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Set-PSCodeHealthPlaceholdersValue | ||
|
||
## SYNOPSIS | ||
Replaces Placeholders in template files with their specified value. | ||
|
||
## SYNTAX | ||
|
||
``` | ||
Set-PSCodeHealthPlaceholdersValue [-TemplatePath] <String> [-PlaceholdersData] <Hashtable> | ||
``` | ||
|
||
## DESCRIPTION | ||
Replaces Placeholders in template files with their specified string value and outputs the new content with the replaced value. | ||
|
||
## EXAMPLES | ||
|
||
### -------------------------- EXAMPLE 1 -------------------------- | ||
``` | ||
$PlaceholdersData = @{ | ||
``` | ||
|
||
REPORT_TITLE = $HealthReport.ReportTitle | ||
ANALYZED_PATH = $HealthReport.AnalyzedPath | ||
} | ||
PS C:\\\> Set-PSCodeHealthPlaceholdersValue -TemplatePath '.\HealthReportTemplate.html' -PlaceholdersData $PlaceholdersData | ||
|
||
Returns the content of the template file with the placeholders 'REPORT_TITLE' and 'ANALYZED_PATH' substituted by the string values specified in the hashtable $PlaceholdersData. | ||
|
||
## PARAMETERS | ||
|
||
### -TemplatePath | ||
Path of the template file containing placeholders to replace. | ||
|
||
```yaml | ||
Type: String | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: True | ||
Position: 1 | ||
Default value: None | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
|
||
### -PlaceholdersData | ||
Hashtable with a key-value pair for each placeholder. | ||
The key is corresponds to the name of the placeholder to replace and the value corresponds to its string value. | ||
|
||
```yaml | ||
Type: Hashtable | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: True | ||
Position: 2 | ||
Default value: None | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
|
||
## INPUTS | ||
|
||
## OUTPUTS | ||
|
||
### System.String | ||
|
||
## NOTES | ||
|
||
## RELATED LINKS | ||
|
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