Search found 13568 matches

by jvierra
Thu Jun 13, 2019 1:51 pm
Forum: PowerShell GUIs
Topic: Invoke-RestMethod disposal error
Replies: 5
Views: 117

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: 117

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: 117

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: 60

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: 73

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: 47

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: 558

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
by jvierra
Wed Jun 12, 2019 5:53 am
Forum: PowerShell GUIs
Topic: Fill Datagridview with data from an access
Replies: 3
Views: 77

Re: Fill Datagridview with data from an access

If you are not using data binding then do not use an adapter. JUst load the data table object and assign. $queryStr = "select IP,NomServer from TaulaLlistatIP where (Part1=$a)" $connStr = 'Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\snnewscpa2\web\llistatIP.mdb' $cmd = New-Object System.Data.Ole...