Command
New-HTMLTextBox
Adds text to HTML where each line in TextBlock is treated as next line (adds BR to each line)
Syntax
New-HTMLTextBox
[-Alignment <left| center| right| justify>]
[-BackGroundColor <String[]>]
[-Color <String[]>]
[-Direction <rtl>]
[-FontFamily <String[]>]
[-FontSize <Int32[]>]
[-FontStyle <normal| italic| oblique>]
[-FontVariant <normal| small-caps>]
[-FontWeight <String[]>]
[-LineBreak]
[[-TextBlock] <ScriptBlock>]
[-TextDecoration <line-through| overline| underline>]
[-TextTransform <uppercase| lowercase| capitalize>]
[<CommonParameters>]#Parameter set:
All Parameter SetsDescription
. Automatic line breaks are main feature that differentiate New-HTMLTextBox from New-HTMLText where TextBlock is treated as single line of text unless LineBreak switch is used.
Examples
Example 1
New-HTMLTextBox {
"Hello $UserNotify,"
""
"Your password is due to expire in $PasswordExpiryDays days."
""
'To change your password: '
'- press CTRL+ALT+DEL -> Change a password...'
''
'If you have forgotten your password and need to reset it, you can do this by clicking here. '
"In case of problems please contact the HelpDesk by visiting [Evotec Website](https://evotec.xyz) or by sending an email to Help Desk."
''
'Alternatively you can always call Help Desk at +48 22 00 00 00'
''
'Kind regards,'
'Evotec IT'
}Parameters
- -Alignment String[]
- Chhoose Alignment
- Possible values:
left,center,right,justify - -BackGroundColor String[]
- Color of Background for a Text to set. Choose one or more colors from up to 800 defined colors. Alternatively provide your own Hex value
- -Color String[]
- Color of Text to set. Choose one or more colors from up to 800 defined colors. Alternatively provide your own Hex value
- -Direction String[]
- Parameter description
- Possible values:
rtl - -FontFamily String[]
- Parameter description
- -FontSize Int32[]
- Choose FontSize. You can provide just int value which will assume pixels or string value with any other size value.
- -FontStyle String[]
- Parameter description
- Possible values:
normal,italic,oblique - -FontVariant String[]
- Parameter description
- Possible values:
normal,small-caps - -FontWeight String[]
- Parameter description
- Possible values:
normal,bold,bolder,lighter,100,200,300,400,500,600,700,800,900 - -LineBreak SwitchParameter
- Parameter description
- -TextBlock ScriptBlock
- ScriptBlock of one or more strings
- -TextDecoration String[]
- Parameter description
- Possible values:
line-through,overline,underline - -TextTransform String[]
- Parameter description
- Possible values:
uppercase,lowercase,capitalize
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.