Search found 13569 matches

by jvierra
Tue Jun 18, 2019 9:31 am
Forum: Windows PowerShell
Topic: Entering text in a textbox
Replies: 1
Views: 57

Re: Entering text in a textbox

You cannot access parts of a form running in another process. This is not p[possible with Windows. Forms controls are not members of a process object. No program internals or data is ever exposed by a process. This is just basic Windows behavior and has nothing to do with scripting. It is part of th...
by jvierra
Thu Jun 13, 2019 1:51 pm
Forum: PowerShell GUIs
Topic: Invoke-RestMethod disposal error
Replies: 5
Views: 122

Re: Invoke-RestMethod disposal error

You also fail to say which platform you are running this on - under platform settings. It shows you which version of PowerShell is being used by PSS when "Run" is clicked.
by jvierra
Thu Jun 13, 2019 12:21 pm
Forum: PowerShell GUIs
Topic: Invoke-RestMethod disposal error
Replies: 5
Views: 122

Re: Invoke-RestMethod disposal error

THe progress bar is not don by PSS. It is how PS displays it when PS code is run in a GUI. THe same will happen in the ISE.

TO disable this just add the following to the code:

$ProgressPreference = 0[/b}

Also check your threading and the platform setting you are using.
by jvierra
Thu Jun 13, 2019 10:23 am
Forum: PowerShell GUIs
Topic: Invoke-RestMethod disposal error
Replies: 5
Views: 122

Re: Invoke-RestMethod disposal error

What "ProgressBar" window are you referring to? Have you created a custom form with a ProgressBar? If this is the automatic progress indicator then this is caused by PowerShell and automatically shows as a GUI in ISE and in PSS and as a text progress indicator in PS CLI. Have you checked the "thread...
by jvierra
Wed Jun 12, 2019 1:58 pm
Forum: PowerShell GUIs
Topic: gray out button based on user ID
Replies: 1
Views: 61

Re: gray out button based on user ID

Just disable the button when the form loads based on a list of users OR … selectively enable buttons based on a user list.
by jvierra
Wed Jun 12, 2019 12:14 pm
Forum: PowerShell GUIs
Topic: datagridview|only New row editable
Replies: 4
Views: 135

Re: datagridview|only New row editable

You have to use an event to add a new row to the grid then set the row to BeginEdit. After that the row is editable. Search for examples of adding and editing rows in a DGV. I don't have any examples that are available to post as most are in C# and the one in PS is way to complicated for use as a sa...
by jvierra
Wed Jun 12, 2019 12:12 pm
Forum: PowerShell GUIs
Topic: Clarification on RunAs and SetExecution
Replies: 2
Views: 77

Re: Clarification on RunAs and SetExecution

"RunAs" is used to elevate a process. "runas user" allows you to specify a specific user credential to run the exe. Why you would use this depends on what you need to accomplish. The rest of your questions are too vague to answer. Try asking one complete question at a time. Also try to understand th...
by jvierra
Wed Jun 12, 2019 11:25 am
Forum: PowerShell GUIs
Topic: How to log Win Form user actions?
Replies: 2
Views: 48

Re: How to log Win Form user actions?

The only options are to add a log function and call it from each button. Ever control event has a hidden variable called "$this". You can use $this.Name to get the name of the button.
by jvierra
Wed Jun 12, 2019 10:25 am
Forum: Windows PowerShell
Topic: Removing duplicates from a CSV file ( NOT unique values )
Replies: 2
Views: 575

Re: Removing duplicates from a CSV file ( NOT unique values )

Excel has a deduplicating method built in. Just select what you want to dedupe and click the button.

In a CSV (a csv is not an Excel workbook it can just be viewed as such) you can use "Group-Object" to dedupe a Csv,

help group-object -online