Powershell is a CLI tool, not a UI. Exactly how are you "creating" a form in PS? Posting the code would be most useful. However note that if you're trying to create a System.Windows.Forms.Form
in PS (because it can create anything) then don't expect it to actually run because a UI requires a message pump and that isn't what PS is for.
If you need a UI then use C# or VB or another programming language and UI framework to build the UI. PS is for CLI.