Search found 11743 matches

by jvierra
Thu Jan 18, 2018 10:09 am
Forum: PowerShell GUIs
Topic: In a Treeview, how to select only one checkbox?
Replies: 5
Views: 231

Re: In a Treeview, how to select only one checkbox?

The code you attached and the CSV do not match.
You are trying to do to many disconnected things without understanding the treeview.

Review the attached to see how to easily work with a treeview and PowerShell.

You can use the function to check any node and all child nodes.
by jvierra
Thu Jan 18, 2018 7:52 am
Forum: PowerShell GUIs
Topic: In a Treeview, how to select only one checkbox?
Replies: 5
Views: 231

Re: In a Treeview, how to select only one checkbox?

You will have to enumerate the child nodes and set the checkbox state. TreeView checkboxes are not identical to standard checkbox controls. $treeview1_AfterCheck=[System.Windows.Forms.TreeViewEventHandler]{ Write-Host $_.Node.Text # check all child nodes $_.Node.Nodes | %{ $_.Checked = $true } }
by jvierra
Wed Jan 17, 2018 2:37 pm
Forum: Windows PowerShell
Topic: Combing 2 objects
Replies: 9
Views: 269

Re: Combing 2 objects

That would not work. foreach ($objA in $objAs) { if($objB = $objBs | where{$_.ComputerName -eq $objA.ComputerName}){ [pscustomobject]@{ ComputerName = $objA.ComputerName Soruce = $objA.Soruce Port = $objA.Port Path1 = $objB.Path1 Path2 = $objA.Path2 Path3 = $objA.Path3 } } else { Write-Host ('Object...
by jvierra
Wed Jan 17, 2018 1:17 pm
Forum: PowerShell GUIs
Topic: Old Project Skewed when opened on HIGH DPI LCD
Replies: 9
Views: 342

Re: Old Project Skewed when opened on HIGH DPI LCD

Here is somebackground on hi-dpi issues with Windows and for developers. https://blogs.windows.com/buildingapps/2017/04/04/high-dpi-scaling-improvements-desktop-applications-windows-10-creators-update/ https://www.howtogeek.com/175664/how-to-make-the-windows-desktop-work-well-on-high-dpi-displays-an...
by jvierra
Wed Jan 17, 2018 1:13 pm
Forum: PowerShell GUIs
Topic: Old Project Skewed when opened on HIGH DPI LCD
Replies: 9
Views: 342

Re: Old Project Skewed when opened on HIGH DPI LCD

It seems that what you are saying is that, with multiple monitors, the scaling is always set to the primary and not to the monitor that you are currently using. This may be an issue wit PSS. I would post a request here: https://www.sapien.com/requests since it will get on the update schedule. I don'...
by jvierra
Wed Jan 17, 2018 8:47 am
Forum: Windows PowerShell
Topic: Combing 2 objects
Replies: 9
Views: 269

Re: Combing 2 objects

help foreach-object -online
by jvierra
Wed Jan 17, 2018 8:11 am
Forum: Windows PowerShell
Topic: Need some help with RegEx
Replies: 4
Views: 151

Re: Need some help with RegEx

Just grab the last piece
($key -split ',')[-1]
by jvierra
Wed Jan 17, 2018 7:33 am
Forum: PowerShell GUIs
Topic: Function Grief!!!
Replies: 7
Views: 201

Re: Function Grief!!!

You can only change variables in an outer scope by specifying the scope. See: help about_scopes To create a scoped variable just do this: $global:myvar = 'stuff' To read the variable anywhere just reference the variable: $myvar If you want to change the value of a global from a child scope you must ...
by jvierra
Tue Jan 16, 2018 10:22 pm
Forum: Windows PowerShell
Topic: Need some help with RegEx
Replies: 4
Views: 151

Re: Need some help with RegEx

What is wrong with this:
Get-Printer | select name
by jvierra
Tue Jan 16, 2018 9:03 pm
Forum: PowerShell GUIs
Topic: Function Grief!!!
Replies: 7
Views: 201

Re: Function Grief!!!

There is no way to advise you when your question is this vague. Basically I see no good technical reason for what you are trying to do. Security has nothing to do with code. Security is a system issue. It must predate coding constructs. You cannot and shoul never rely on code obfuscation as a securi...