Search found 15399 matches

by jvierra
Thu Jun 01, 2023 2:51 pm
Forum: PowerShell GUIs
Topic: PS Studio / EXO v3 / 3.1.0 issues
Replies: 3
Views: 392

Re: PS Studio / EXO v3 / 3.1.0 issues

Adding code to the top oof a form in PSS causes the code to be executed on the forms thread. You must load before calling the form function.
by jvierra
Wed May 31, 2023 4:48 pm
Forum: PowerShell GUIs
Topic: Form validation doco
Replies: 7
Views: 170

Re: Form validation doco

Couldn't get my thick head to see that you were criticizing the documentation and not how to use the event.

Take two points and a chocolate chip cookie. I need one more lemon to make lemonade.
by jvierra
Tue May 30, 2023 6:01 am
Forum: PowerShell GUIs
Topic: Form validation doco
Replies: 7
Views: 170

Re: Form validation doco

Never-the-less, that is how event routing works in Windows. It has always worked like that. "Cancel" means stop processing all related events in the validation chain. Other events will not be affected.

Set $_.Cancel equal to $true when you wish to STOP processing events.
by jvierra
Mon May 29, 2023 8:11 pm
Forum: PowerShell GUIs
Topic: Form validation doco
Replies: 7
Views: 170

Re: Form validation doco

Please reread the page carefully. You may also want to look at how events are routed in forms. What is the next event after "Validating"?

WHen validation fails we want to stop(cancel) processing the event.
by jvierra
Thu May 25, 2023 9:39 pm
Forum: PowerShell GUIs
Topic: Unhandled Exception "System Error"
Replies: 8
Views: 551

Re: Unhandled Exception "System Error"

The word I posted is "contains". You really need to take time to learn PowerShell basics and these things wouldn't happen.
if(Get-ADUser $Cred.UserName -Properties memberof).memberOf -contains 'Groupname'){
by jvierra
Thu May 25, 2023 11:14 am
Forum: PowerShell GUIs
Topic: Unhandled Exception "System Error"
Replies: 8
Views: 551

Re: Unhandled Exception "System Error"

Likely the user does not exist. Get user separately to be sure you have one.
by jvierra
Wed May 24, 2023 5:02 pm
Forum: PowerShell GUIs
Topic: Unhandled Exception "System Error"
Replies: 8
Views: 551

Re: Unhandled Exception "System Error"

"MemberOf" is a list of items so "like" will not work as expected.

I recommend taking some time to learn basic programming primitives that allow us to match select and filter items and groups.

if(Get-ADUser $Cred.UserName -Properties memberof).memberOf -contains 'Groupname' ){
by jvierra
Mon May 22, 2023 7:44 pm
Forum: PowerShell GUIs
Topic: datagridwiew result
Replies: 5
Views: 278

Re: datagridwiew result

The issue is tat you are not working with "Object" or "PsObject" collections:. Tiese objects are "CIM" objects, See: TypeName: Selected.Microsoft.Management.Infrastructure.CimInstance Name MemberType Definition ---- ---------- ---------- Equals Method bool Equals(System...
by jvierra
Fri May 19, 2023 4:05 pm
Forum: PowerShell GUIs
Topic: Unhandled Exception "System Error"
Replies: 8
Views: 551

Re: Unhandled Exception "System Error"

"Match" requires a regex expression. "Like" requires a wild card.
by jvierra
Fri Apr 21, 2023 1:55 pm
Forum: PowerShell GUIs
Topic: Exit Splash Screen
Replies: 2
Views: 1725

Re: Exit Splash Screen

Everything you need to know about a SplashScreen is here: https://info.sapien.com/index.php/how-t ... ens-batman