Embedded powershell tools - potential bug found with it..

Resolved Backlog

Embedded powershell tools - potential bug found with it..

avatar

I can't find my old thread on this topic, or I'd have used that rather than start a new one. I *believe* I may have discovered the source of my issue, and if I am right, maybe you guys can help me fix it.

The issue has always been: when running the Tools | Powershell (RDM Cmdlet) menu item, the embedded powershell window extends past the bottom border of the application. The only thing I have been able to do is manually import the .psd1 file and use it that way.

I did however install RDM on my home laptop to look at a few things with it, and when I ran the same powershell tool, the embedded window worked correctly. It went to the bottom, and stopped exactly as it should. I will try an attach a screenshot tonight of the working copy, but I am attaching a screenshot of the "broken" window for reference.

My working theory at this point is that the oversized powershell window/failure to embed correctly is tied to multiple monitors, while a single monitor system does not seem to experience the issue. I wish I had another system or 2 to confirm it, but I don't at this point. If you guys could confirm or deny it for me, I'd really appreciate it :-)

I did more playing around while I was working on this email, and I did find something very odd - when I moved RDM to a different monitor (different size) and relaunched the ps window, it worked fine. When I brought it back, it worked fine. When I closed it and relaunched it on the original monitor, it failed again. Resizing it a few times/dragging it back and forth seems to "fix" it?

David F.

RDM_Oversized_Powershell_Window_1.png - shows the bottom of the window on the left, and how the prompt is missing (it's actually "offscreen")

RDM_Oversized_Powershell_Window_2.png - shows the result of a get-childitem on a long directory in this window. The screen buffer just continually repeats itself until you do something *else* in the window, and then it straightens itself out.

RDM_Oversized_Powershell_Window_3.png - another instance of the issue in the #2 picture.

RDM_Oversized_Powershell_Window_4.png - shows that the scroll bar is missing on the window, which I believe is tied to the problem.

RDM_Oversized_Powershell_Window_5.png - shows the error I get on my work machine here when I first load the ps window

Here is the error text (copy & paste) just in case...

Resize PowerShell buffer and window size

Exception setting "BufferSize": "Cannot set the buffer size because the size specified is too large or too small.

Parameter name: value

Actual value was 192,4000."

At line:3 char:1

+ $Host.UI.RawUI.BufferSize = new-object System.Management.Automation.H ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : NotSpecified: (:) [], SetValueInvocationException

+ FullyQualifiedErrorId : ExceptionWhenSetting

Loading RDM CmdLet (Module)

All Comments (16)

avatar

Hello,

About the error message, could you please check in File - Options - Tools if the Resize window option is enable in the PowerShell (RDM Cmdlet) section is enabled?

And there are also other settings you can change in File - Options - Types - Other - PowerShell for the window and buffer size.

Best regards,

Érica Poirier

avatar

Yes, the Resize Window is checked.

Although, my Debug selection is also checked (out of the box install)

The Buffer size is configured the same as your screenshot.

David F.

avatar

I had the same problem on my home laptop when launching.. so that definitely disproves my working theory. Still have the issue, and I have no good way to track down why its doing it.

David F.

avatar

Hello,

A ticket has been sent to our engineering department and the ticket number is RDMW-1922. We will keep you posted on this as soon as we will found something.

Best regards,

Érica Poirier

avatar

Hello,

I have played around with the settings and when the Resize Window and the Debug options are disabled, I do not experience the issue anymore. Could you please try this and let me know if this resolve your issue?

Best regards,

Érica Poirier

avatar

It definitely seems tied to the Resize Window checkbox. I turned that off, and the problem appears to go away. When I put the checkmark back on it, the error message reappears, and the problem reappears. After the problem appears, flipping that same checkmark without restarting the window still seems to fix it.

So, at this point I'm good, but that is definitely a bug in it.. thank you!

David F.

avatar

Hello,

Thank you for your feedback and glad that disabling those options help to resolve the issue.

The ticket is still open and we will update this thread when a fix will be available.

Best regards,

Érica Poirier

avatar

I realize this ticket is really old, and it is still actually an issue (I'm on the newest version now 2021.2.27). Talking to one of the Devolutions staff on a completely unrelated chat server, I think we diagnostic the problem as an issue with the default font being used. In my PS sessions on every machine, one of the very first things I do is change my default font go to Consolas.

Can you guys test this and verify if this is correct? And obviously, if it is correct - then obviously, can we get a fix??

Thanks!

David F.

avatar

Hello,

Thank you for your feedback.

I do no longer get the issue with the latest version using the Consolas font. It's already the default font on my system for PowerShell. The bottom screen of the embedded RDM PowerShell window scrolls properly when the results of commands expend over the bottom limits. I can also see the scroll bar on the right of the embedded PowerShell.

What screen resolution do you have on the primary monitor?

What font size are you using?

Best regards,

Érica Poirier

avatar

Hello, all;

Marc-Antoine Dubois at Devolutions suggested I post on this thread following a support session earlier today.

Posting here for any other Windows environment administrators who are experiencing issues with PowerShell Remote Console entry types not working with Windows PowerShell 5.1 (which is the default included PowerShell environment in Windows since 2016 and will continue to be for the foreseeable future).

I had a support call with Devolutions earlier this morning investigating this issue, which is remarkably similar to, if not the same issue as described in this thread. When launching Powershell Remote Console entries or using any other feature which relies upon that feature, if you get the following error:

Invoke-Expression : Exception setting "BufferSize": "Cannot set the buffer size because the size specified is too large or too small.
Parameter name: value
Actual value was 192,4000."
At line:32 char:13
+             Invoke-Expression $SecureCommand
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Invoke-Expression], SetValueInvocationException
    + FullyQualifiedErrorId : ExceptionWhenSetting,Microsoft.PowerShell.Commands.InvokeExpressionCommand

but it works normally if you just open PowerShell and run Enter-PSSession -ComputerName foo and it works just fine, it appears to be a result of the below issue.

Devolutions has deemed the default included Windows PowerShell 5.1 environment as 'deprecated' and not worth developing features for, despite it still being the default included Windows PowerShell environment, and being fully supported by Microsoft as long as the host operating system in which it was included is within its support life cycle.

If you're an administrator hoping that you'll be able to use the PowerShell Remote Console for its intended functionality without deploying PowerShell 7 in your environment, I'd spend your time on something else, since I was told there will likely not be a fix for this.

If there are any further details on resolving this or any future development to fix this broken feature, I look forward to hearing them, however it sounds like it's basically install/deploy PowerShell 7 in your environment, or don't use these features in RDM.

With that said, I do suggest to Devolutions if they're not going to support the single most widely used (and default, for that matter) PowerShell environment, that the option should be removed from the drop-down menu in the PowerShell Remote Console entry properties.

Hopefully this saves someone from spending a ton of time on this like I have. Cheers!

--

Griffeth Barker

💻 Call/Chat on Microsoft Teams

📧 Send me an email

🔗 Connect on LinkedIn