Search found 217 matches

by Lembasts
Sun May 26, 2019 6:25 pm
Forum: PowerShell Studio
Topic: debugger hangs on adsisearcher
Replies: 5
Views: 1721

debugger hangs on adsisearcher

Product, version and build: PS build 163 32 or 64 bit version of product: 64 bit Operating system: windows 10 1709 32 or 64 bit OS: 64 I have a single form with this line of code: $search = [adsisearcher]$ldapfilter If I put a breakpoint on that line, run the debugger and press F11 to execute that l...
by Lembasts
Thu May 23, 2019 9:50 pm
Forum: PowerShell GUIs
Topic: debugging hang on AD directory seacher
Replies: 8
Views: 689

Re: debugging hang on AD directory seacher

I thought it might have something to do with :
$ExecutionContext.SessionState.LanguageMode
but when I run that in the console it says FullLanguage.
by Lembasts
Thu May 23, 2019 9:45 pm
Forum: PowerShell GUIs
Topic: debugging hang on AD directory seacher
Replies: 8
Views: 689

Re: debugging hang on AD directory seacher

Yeh - its strange.
If I just highlight the code and select 'run selection in console' it works fine.
If I compile it into an exe and run it it doesnt work and neither does debugging.
by Lembasts
Thu May 23, 2019 9:24 pm
Forum: PowerShell GUIs
Topic: debugging hang on AD directory seacher
Replies: 8
Views: 689

debugging hang on AD directory seacher

Greetings,

I have a line of code that goes something like:
$search = new-object System.directoryservices.directorysearcher
When I use the debugger and go through my code line by line, I get to this line and press F11 and it just hangs.
Any ideas why?
Thanks
David
by Lembasts
Tue May 21, 2019 3:57 pm
Forum: PowerShell GUIs
Topic: Displaying a modal form
Replies: 16
Views: 1076

Re: Displaying a modal form

Thanks for that. DLLs are way beyond my ability Im afraid. I think Ill stick to the timer and make it really short. If they dont press the button within 5 seconds, Ill force a logoff. We are not really expecting people to be malicious enough to try and launch task manager to kill the app within 5 se...
by Lembasts
Tue May 21, 2019 3:26 pm
Forum: PowerShell GUIs
Topic: Displaying a modal form
Replies: 16
Views: 1076

Re: Displaying a modal form

Thanks.
Do you have any suggestions other than a timer that I could use?
Essentially I want the form displayed as soon as they logon and not really allow them to do anything until they have completed a button on the form.
by Lembasts
Tue May 21, 2019 2:30 pm
Forum: PowerShell GUIs
Topic: Displaying a modal form
Replies: 16
Views: 1076

Re: Displaying a modal form

Thanks.
When I saw this:
https://social.technet.microsoft.com/Fo ... powershell
I decided it was way to hard.
Looks like Im back to the timer thing...
by Lembasts
Mon May 20, 2019 8:54 pm
Forum: PowerShell GUIs
Topic: Displaying a modal form
Replies: 16
Views: 1076

Re: Displaying a modal form

So they dont like my timer as people can alt-tab, perhaps launch task manager quickly and kill my task.
So can a window be displayed in secure desktop mode?
by Lembasts
Sun May 19, 2019 6:52 pm
Forum: PowerShell GUIs
Topic: Displaying a modal form
Replies: 16
Views: 1076

Re: Displaying a modal form

I came up with a solution that will work.
I start a timer when the form loads and if they dont press a specific button on the form within 60 seconds, they will be logged off.
by Lembasts
Sun May 19, 2019 4:02 pm
Forum: PowerShell GUIs
Topic: Displaying a modal form
Replies: 16
Views: 1076

Re: Displaying a modal form

I think the term is 'Secure desktop' form.