Search found 12369 matches

by jvierra
Thu Jul 12, 2018 8:45 am
Forum: PowerShell GUIs
Topic: Runspaces with Winform, are they disposed ?
Replies: 7
Views: 119

Re: Runspaces with Winform, are they disposed ?

I tried with the pool but i couldn't find out how i should pass the sharedData variable. I tried to pass it a long to the runspace but it kept notifying me that it wasn't possible. So i figured i just simplify and just try with one powershell instance and runspace. But yes a pool would be better. I...
by jvierra
Thu Jul 12, 2018 7:29 am
Forum: PowerShell GUIs
Topic: Runspaces with Winform, are they disposed ?
Replies: 7
Views: 119

Re: Runspaces with Winform, are they disposed ?

I forgot to note that you should use a runspace pool. Assign the pool to the PS instance and set the pool for the min and max number of runspaces. The pool will recycle the runspaces as needed, Tis will allow you to do most things with a pool of 5. Consider the following: # configure pool $iss = [in...
by jvierra
Thu Jul 12, 2018 6:54 am
Forum: PowerShell GUIs
Topic: Runspaces with Winform, are they disposed ?
Replies: 7
Views: 119

Re: Runspaces with Winform, are they disposed ?

Since you are not executing the runspace "async" then there is no gain by using a runspace. What you are trying to do would be better served and managed using jobs. Jobs always run async and you can easily create many and mange them easily with the JobTracker control set. Rule #1 of programming. Don...
by jvierra
Thu Jul 12, 2018 6:40 am
Forum: PowerShell GUIs
Topic: Runspaces with Winform, are they disposed ?
Replies: 7
Views: 119

Re: Runspaces with Winform, are they disposed ?

When finished with the runspace just "Dispose" it. It the variables are removed or they go out-of-scope the system will automatically dispose the runspace.
by jvierra
Thu Jul 12, 2018 3:01 am
Forum: PowerShell GUIs
Topic: SendPingAsync makes form freeze
Replies: 15
Views: 252

Re: SendPingAsync makes form freeze

I don't think anyone will mind if you call it CIDR.
by jvierra
Wed Jul 11, 2018 3:24 pm
Forum: PowerShell GUIs
Topic: SendPingAsync makes form freeze
Replies: 15
Views: 252

Re: SendPingAsync makes form freeze

Excellent. Looks very easy to use and very useful for large pings. One note - What you are calling CIDR is really just mask length. A CIDR is a network number plus mask length. CIDR = 10.0.10.0/24 It is the notation used by classless routing schemes and goes beyond the segment notation. CIDR allows ...
by jvierra
Wed Jul 11, 2018 2:31 pm
Forum: Windows PowerShell
Topic: split satement
Replies: 10
Views: 253

Re: split satement

Simple to say but no examples that any of us have given you have been acceptable. Answering that question always leads to a new statement of the question with new rules. An you understand my point?
by jvierra
Wed Jul 11, 2018 2:03 pm
Forum: Windows PowerShell
Topic: split satement
Replies: 10
Views: 253

Re: split satement

As I have posted more than 5 times, I cannot understand what you want and I cannot write custom code for you. If you would take the time to learn and understand PowerShell and basic programming you would probably be able to ask a better question. If this is of critical importance then you should hir...
by jvierra
Wed Jul 11, 2018 6:20 am
Forum: Windows PowerShell
Topic: split satement
Replies: 10
Views: 253

Re: split satement

$country = ('abc N Refund Maker_Japan_2017_302413 modified date :26/06 10:20' -split '_')[1] $year = ('abc N Refund Maker_Japan_2017_302413 modified date :26/06 10:20' -split '_')[2] If you would take some time to learn PowerShell instead of trying to guess at everything you would find that this is...
by jvierra
Wed Jul 11, 2018 6:06 am
Forum: PowerShell GUIs
Topic: Adding combobox column to DataGridView
Replies: 9
Views: 212

Re: Adding combobox column to DataGridView

The paint method will set the colors as needed. You just have to write the code that chooses the colors.