Skip to content

Instantly share code, notes, and snippets.

@TheKevinWang
Created November 7, 2023 23:03
Show Gist options
  • Save TheKevinWang/5dedb7abbc8c51c24d55dbc60ab937de to your computer and use it in GitHub Desktop.
Save TheKevinWang/5dedb7abbc8c51c24d55dbc60ab937de to your computer and use it in GitHub Desktop.
Show message box in powershell using Windows.Forms.Application in a style that fits w10/11
[System.Windows.Forms.Application]::EnableVisualStyles();
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.MessageBox]::Show("failed", "status", "OK", "Error")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment