Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 4 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
I have a form made in Powershell Studio that works great if I specify $Input manually. Where exactly do I put those 3 lines in Powershell Studio? I have tried inside of $formBlah_Load and I have tried as the first 3 lines but my form is blank.
I was under the impression that one had to hack the registry to make a context menu for ADUC to run a .ps1 file. My goal is to be able to right-click a computer in ADUC and for the form to know what computer I just right-clicked.
I really appreciate your help! I am almost there. Granted I might be going about this all wrong. So using your form as an example, everything works if I do the following:
This returns exactly what it is supposed to for each right-click of a computer in ADUC. If I add "-WindowStyle Hidden" to the .bat file the form goes blank. I am just trying to hide the console window.
First, I want to say thank you for replying to all of my newbie questions. I really appreciate it, since forms are really new to me. Not to sound dense but what do people normally do for a context menu and ADUC? I had a form working with the hidden switch. Below is the first part of the script. I am guessing there is something different between what I am making in Powershell Studio and the script below.
Thanks again for pointing me to the right direction! I got this to work with the window hidden. After I exported to PS1 from PSS, I add the following at line 1:
This topic is 4 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.