functions/private/Invoke-Message.ps1

1
2
3
4
5
6
7
8
9
10
11
 function Invoke-Message {
            [CmdletBinding()]
            param(
                [Parameter(Mandatory=$true)]
                [ValidateNotNullOrEmpty()]
                [string] $Message
            )
            Write-Log -Message $Message
            $null = Add-Type -AssemblyName System.Windows.Forms -ErrorAction Ignore -IgnoreWarnings
            [System.Windows.Forms.MessageBox]::Show($Message)
        }