public/Write-CmdletNote.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
function Write-CmdletNote() { Param( [Parameter(Position = 0)] [PsCustomObject] $Model, [Parameter(Position = 1)] [String] $Template ) $notes = (Write-EscapedMarkdownString ($Model.AlertSet | Out-String)) if(![String]::IsNullOrWhitespace($notes)) { if([String]::IsNullOrWhitespace($Template)) { $Template = "`n## Note`n`n{0}`n`n" } return [String]::Format($Tempate, $notes); } return ""; } |