public/macro/Format-ConfluenceMessageBoxMacro.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
function Format-ConfluenceMessageBoxMacro {
    [CmdletBinding()]
    param (
        # Type
        [Parameter(Mandatory,Position=0)]
        [ValidateSet("tip","info","note")]
        [string]
        $Type,

        # Message body
        [Parameter(Mandatory,Position=1)]
        [string]
        $MessageBody,

        # Title
        [Parameter(Position=2)]
        [string]
        $Title,

        # Hide icon flag
        [Parameter(Position=3)]
        [switch]
        $HideIcon
    )
    
    begin {
        
    }
    
    process {
        (New-Object PowerConfluenceMessageBoxMacro @($Type, $MessageBody, $Title, !$HideIcon)).ToString()
    }
    
    end {
        
    }
}