1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
$CodigoC = @" using System; using System.Diagnostics; using System.Runtime.InteropServices; public static class User32 { [DllImport("user32.dll", CharSet=CharSet.Auto)] public static extern bool MessageBox( IntPtr hWnd, /// Parent window handle String text, /// Text message to display String caption, /// Window caption int options); /// MessageBox type } "@ Add-Type -TypeDefinition $CodigoC -ErrorAction SilentlyContinue [User32]::MessageBox(0,"Texto","Título",0) |