Function/System/Restart-F2B.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
function Restart-F2B (){
    <#
    .SYNOPSIS
        Function to Restart Fail2Ban Service
    .EXAMPLE
        C:\PS> Restart-F2B
    .NOTES
        Author : Thomas ILLIET
        Date : 2018-02-15
        Last Update : 2018-02-15
    #>

    Try {
        Stop-F2B
        Start-F2B
    } Catch {
        write-error "Unable to restart Fail2ban Service"
    }
}