question

Filip-2434 avatar image
0 Votes"
Filip-2434 asked MotoX80 edited

Powershell how to run windows form application?

Hello.

I wanna to run my windows for application with powershell is it possible?.
This is my code:



 Add-Type -TypeDefinition @"
 using System;
 using System.Windows.Forms;
    
 namespace Test1
 {
     public partial class Form1
     {
            
         public Form test = new Form();
    
         public Padding a = new Padding();
     
         public void Main(){
             test.Text = "HEllo world";
                
             test.Padding = a;
             Console.WriteLine("Hello world!");
         }
     }
 }
    
    
 "@ -ReferencedAssemblies System.Windows.Forms


Thanks for help.



windows-server-powershell
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MotoX80 avatar image
1 Vote"
MotoX80 answered MotoX80 edited
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.