Search found 34 matches

by Chris.Ediger
Mon Mar 16, 2020 2:14 pm
Forum: Windows PowerShell
Topic: Unhandled Exception when using break in function
Replies: 8
Views: 203

Re: Unhandled Exception when using break in function

I'm not a programmer at all. Everything I've done is self taught so I'm sure I'm doing a lot of things in a jankey sort of way. I do the best I can until it works.
by Chris.Ediger
Mon Mar 16, 2020 1:29 pm
Forum: Windows PowerShell
Topic: Unhandled Exception when using break in function
Replies: 8
Views: 203

Re: Unhandled Exception when using break in function

I have this function run in the context of my larger user creation function. When the user clicks my "Create User" button it calls a user creation function that has the Get-DomainAdminCredentials function first. After it gathers the (correct) credentials it goes on to do the rest of the stuff... If ...
by Chris.Ediger
Mon Mar 16, 2020 12:46 pm
Forum: Windows PowerShell
Topic: Unhandled Exception when using break in function
Replies: 8
Views: 203

Re: Unhandled Exception when using break in function

Full errror See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.Management.Automation.BreakException: System error. at System.Management.Automation.Interpreter.ThrowInstruction.Run(Interprete...
by Chris.Ediger
Mon Mar 16, 2020 12:44 pm
Forum: Windows PowerShell
Topic: Unhandled Exception when using break in function
Replies: 8
Views: 203

Re: Unhandled Exception when using break in function

I tried using return but it returned and started running the functions that were next in line as if the previous function didn't have an error. My flow is Tech clicks "Create User" button Function 1 - Gets credentials. If credentials are incorrect 3x gives message to verify and try again Function 2 ...
by Chris.Ediger
Mon Mar 16, 2020 12:36 pm
Forum: Windows PowerShell
Topic: Unhandled Exception when using break in function
Replies: 8
Views: 203

Unhandled Exception when using break in function

I have a function that I need to break out of if a certain condition error is encountered but I want the form to remain open so the user can retry the input. I used 'break' in my function which works as expected but I get an Unhandled exception "System error". How do I resolve the Unhandled exceptio...
by Chris.Ediger
Thu Feb 27, 2020 2:39 pm
Forum: PowerShell GUIs
Topic: Open new form to get date
Replies: 2
Views: 840

Open new form to get date

I need to get date info when a certain item is selected from a combo box. Is there a way to spawn a new form that has the DateTimePicker control on it then take the chosen date and use it in the original form?
by Chris.Ediger
Fri Feb 14, 2020 7:43 am
Forum: PowerShell GUIs
Topic: Progress bar while collecting user info
Replies: 2
Views: 953

Progress bar while collecting user info

I'm looking for a way to show a progress bar of some kind while my tool collects a (large!) list of user information. After the user enters their credentials the script goes out and grabs all the users in Get-MSolUser -All and this takes about 30-40 seconds during which time there is nothing indicat...
by Chris.Ediger
Mon Jan 06, 2020 2:22 pm
Forum: PowerShell GUIs
Topic: Event on tab or mouse click?
Replies: 2
Views: 374

Event on tab or mouse click?

I would like to trigger an event when a user clicks or tabs into a field. I have a combo box that contains a username. The list is taken from AD. Once the user selects the name they want I would like a text box to be populated with info based on the username field. Is there a way to trigger an event...
by Chris.Ediger
Wed Oct 16, 2019 7:26 am
Forum: PowerShell Studio
Topic: Deploying Script .exe with jpg causes error
Replies: 2
Views: 614

Re: Deploying Script .exe with jpg causes error

It is a tool that admins use to create AD user accounts. The script sends out an email to the new user and their manager. The email contains a jpg image of a thing they are supposed to do. It looks like I solved the problem though by dropping the jpg into the script root. I tested it and it seems to...
by Chris.Ediger
Tue Oct 15, 2019 8:44 am
Forum: PowerShell Studio
Topic: Deploying Script .exe with jpg causes error
Replies: 2
Views: 614

Deploying Script .exe with jpg causes error

Product: PowerShell Studio 2019 (64 Bit) Build: v5.6.167 OS: Windows 10 Enterprise (64 Bit) Build: v10.0.17763.0 I have a tool I built that includes some html code that references a jpg file. After compiling and running the exe I get an Unhandled exception error "Exception calling ".ctor" with "2" a...