Search found 7023 matches

by Alexander Riedel
Fri Jul 19, 2019 10:37 am
Forum: PowerShell Studio
Topic: Does the deubgger in Studio debug PowerShell 6 scripts?
Replies: 1
Views: 856

Re: Does the deubgger in Studio debug PowerShell 6 scripts?

No, not yet. Microsoft dragged their feet releasing a functioning SDK for PowerShell Core.
There is no specified date at this time. As PowerShell 7 will become a mainstream Windows component again, it will make things 'easier'.
by Alexander Riedel
Wed Jul 17, 2019 11:51 pm
Forum: PowerShell GUIs
Topic: Problem getting the current BackColor of a textbox object
Replies: 17
Views: 1222

Re: Problem getting the current BackColor of a textbox object

Seems like you can use another .NET type for a conversion:
if($label1.BackColor.IsNamedColor -eq $false) {
$BackColor = $label1.BackColor.Name
$BackColor = [System.Drawing.ColorTranslator]::FromHtml('#'+$BackColor)
}

Or at least that's what Google said :D
by Alexander Riedel
Wed Jul 17, 2019 11:35 pm
Forum: PowerShell GUIs
Topic: Problem getting the current BackColor of a textbox object
Replies: 17
Views: 1222

Re: Problem getting the current BackColor of a textbox object

All UI controls with color settings use the type [System.Drawing.Color]. I use a label here, but it doesn't really matter. if($label1.BackColor.IsNamedColor -eq $true){ $ColorName = $label1.BackColor.Name } else { $label1.BackColor = 'green' $ColorName = $label1.BackColor.Name } [System.Windows.Form...
by Alexander Riedel
Wed Jul 17, 2019 7:45 am
Forum: PowerShell GUIs
Topic: Problem getting the current BackColor of a textbox object
Replies: 17
Views: 1222

Re: Problem getting the current BackColor of a textbox object

2019-07-17_7-44-02.png
2019-07-17_7-44-02.png (17.96 KiB) Viewed 681 times
by Alexander Riedel
Tue Jul 16, 2019 4:12 pm
Forum: PowerShell Studio
Topic: not getting output from msgbox
Replies: 14
Views: 2416

Re: not getting output from msgbox

$PSScriptRoot and $PSCommandPath are filled where possible as a convenience to users. You must keep in mind though that packaged code does not run as a script. It is executed as code in a custom host. So there are some differences to keep in mind and PowerShell is likely getting confused as to the s...
by Alexander Riedel
Mon Jul 15, 2019 1:27 pm
Forum: PowerShell Studio
Topic: not getting output from msgbox
Replies: 14
Views: 2416

Re: not getting output from msgbox

It really depends on what you are doing. In a nutshell: Windows is a generic Windows app and all output (e.g. Write-Host) is directed to a message box. Windows Forms eats all generic powershell output from Write-host, write-output, out-* etc. All output must be through form elements or message boxes...
by Alexander Riedel
Mon Jul 15, 2019 11:20 am
Forum: PowerShell Studio
Topic: not getting output from msgbox
Replies: 14
Views: 2416

Re: not getting output from msgbox

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build:
32 or 64 bit version of product:
Operating system:
32 or 64 bit OS:
by Alexander Riedel
Thu Jul 11, 2019 5:01 am
Forum: PowerShell Studio
Topic: Running an exported form in ConstrainedLanguage mode causes massive errors
Replies: 2
Views: 1133

Re: Running an exported form in ConstrainedLanguage mode causes massive errors

We sent a request regarding this constrained mode around. Since we have no encountered this before we suspected it is not in very wide use. Below is the reply from Lee Holmes at Microsoft on this subject: It might be a good time to talk to your customer 😊 Anything but NoLanguage mode in an endpoint ...
by Alexander Riedel
Tue Jul 09, 2019 6:43 am
Forum: Windows PowerShell
Topic: Weird behavior from executable.
Replies: 8
Views: 2083

Re: Weird behavior from executable.

[Moved by moderator]
by Alexander Riedel
Tue Jul 09, 2019 6:42 am
Forum: Windows PowerShell
Topic: Weird behavior from executable.
Replies: 8
Views: 2083

Re: Weird behavior from executable.

Without knowing exactly what your code does, that is hard to diagnose.
I will move this to the general PowerShell section.
But since it seems to involve remoting, I would look into permission and firewall settings.