PowerShell functions for Windows Forms