functions/message/Clear-PSFMessage.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function Clear-PSFMessage {
<#
    .SYNOPSIS
        Clears the in-memory log of the message system.
     
    .DESCRIPTION
        Clears the in-memory log of the message system.
        Has no effect on written logfiles, table entries, eventlog logs or wherever else you may be logging.
     
    .EXAMPLE
        PS C:\> Clear-PSFMessage
     
        Clears the in-memory log of the message system.
#>

    [CmdletBinding()]
    param ()
    
    process {
        [PSFramework.Message.LogHost]::ClearLog()
    }
}