I just upgraded to 12.0.1 Enterprise
I started up the Powershell (RDM Cmdlet) from the Tools menu (anxious to see the new module!)
When I start it up, it comes up and says resizing.. but it doesn't actually fit the correct work area like the RDP sessions do. The actual prompt is below the bottom toolbar, so I have to scroll down every time I enter a command..
Hopefully this info helps:
PS C:\Program Files (x86)\Devolutions\Remote Desktop Manager> $host.ui.rawui
ForegroundColor : DarkYellow
BackgroundColor : DarkMagenta
CursorPosition : 0,2147
WindowPosition : 0,2093
CursorSize : 25
BufferSize : 192,4000
WindowSize : 164,71
MaxWindowSize : 192,71
MaxPhysicalWindowSize : 192,71
KeyAvailable : False
WindowTitle : Windows PowerShell
if I run a 1..70 | foreach-object { $_ } the line count starts at 1 and goes to 60 on the screen.. but I can scroll down to 70
if I run: for ($i = 1; $i -le 20; $i++) { 0..9 | foreach-object { [string]$string += $_ } } and then run $string just to show the width, the columns do not properly show.
It shows 163 characters and onscreen it ends in 0123 and the next line shows 23456789
but if I use the drag/copy function, then i pick up the full string with no missing or duplicated characters, and of course the string length is 200 as it should be.
So, my guess is that the logic to set the window size is not quite correct.. :-\
But, so far, loving the new powershell module :-) looks like it is going to be far easier to use :-)
David F.
Hello,
Please consult this post https://forum.devolutions.net/topic26957-powershell-windowsize-error.aspx#post99224 on how to change the PowerShell window size.
Best regards,
Érica Poirier
The problem isn't me fixing it.. (which I certainly will now).. to me, the issue is that it says it is resizing automatically, but it fails..
David F.
I've upgraded to RDM Enterprise 12.0.2.
I went and checked the settings from the post you had linked, and those settings are set to -1 as specified. (Must be the default, I've never touched them before).
I had created a separate powershell console window in RDM for my own use, and it behaves perfectly correctly. However, the Powershell (RDM CmdLet) button still produces an embedded shell that is too large for the physical window. I tried changing the listed settings to the "correct" settings like it shows in the $host.ui.rawui data, and it is still incorrect.
The ps window that is correct has these properties:ForegroundColor : DarkYellowBackgroundColor : DarkMagentaCursorPosition : [b][color=#ff0099]0,2999[/color][/b]WindowPosition : [b][color=#ff0099]0,2941[/color][/b]CursorSize : 25BufferSize : 164,3000WindowSize : 164,59[color=#009900]MaxWindowSize : [b]164,71[/b][/color]MaxPhysicalWindowSize : 192,71KeyAvailable : FalseWindowTitle : Windows PowerShell
While the RDM window has these:ForegroundColor : DarkYellowBackgroundColor : DarkMagentaCursorPosition : [b][color=#ff0099]0,3[/color][/b]WindowPosition : [b][color=#ff0099]0,0[/color][/b]CursorSize : 25BufferSize : 192,4000WindowSize : 164,71[color=#009900]MaxWindowSize : [b]192,71[/b][/color]MaxPhysicalWindowSize : 192,71KeyAvailable : FalseWindowTitle : Windows PowerShell
You can see that the cursor & window positions are different (I'm not sure how much difference this makes). However, the MaxWindowSize is absolutely different. I tried setting the File | Options | Types | Others | Powershell to 164 rows for the Window size and it still didn't help.
I will start a 2nd thread for another issue I found with this (related, but not the same :-)
Thank you,
David F.
Hi David,
I asked you a similar question in your other thread but Do you use Remote Desktop Manager 64 bits or 32 bits? When you use the 64 bits version, the PowerShell used in PowerShell (RDM CMDLET) is the 64-bit (x64) Powershell executable located in "%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe" otherwise it's the 32-bit (x86) PowerShell executable located in "%SystemRoot%\SysWOW64\WindowsPowerShell\v1.0\powershell.exe"
To create your separate PowerShell console window in RDM, I suppose you created a Command Line session and the command is the path to the PowerShell application? Is it PowerShell 32 bits or 64 bits?
Could you also send me a screenshot of the RDM window with the PowerShell console that doesn't resize correctly?
Best regards,
Olivier Désalliers
the above reply was mine.. the session timed out while I had this in my browser window.. :\:
Thank you again :-)
David F.
I would love to see RDM get the ability to embed a cmder window similar to how cmder allows you to capture cmd/PoSH/Bash windows. Cmder uses an alternate command shell that handles resizes and colors much better and doesn't suffer from some of the weirdness of the Windows default cmd prompt (that is slightly better in Windows 10).
Hi,
I don't know if it's possible but you could do a simple test. Just create a Command Line session and invoke cmder. Please make sure to specify embedded. We will be able to verify if our hack to embed an external app works with cmder.
Regards
David Hervieux
This kind of hijacked my thread, so hopefully Olivier will get back to me on my screenshots.. :-)
In the meantime, I downloaded cmder and tried to create the embedded session as you described (David H), and it did not work. It launched cmder, but the window was not embedded, and no tab was created to represent it.
Thank you,
David F.
Hi David,
Do you have the same problem when you create a PowerShell session in RDM or it's only when you open the embedded PowerShell in the Tools tab? If so, can you uncheck the "Resize window" checkbox in the session settings?
Best regards,
Olivier Désalliers
Sorry for hijacking the thread David F. I am actually running into the same issue, and apparently I forgot to add my +1 for having the issue before pondering a potential workaround. It appears that if you type "exit" in the PSSession window you drop to a regular cmd prompt, and I think on Windows 7 that one doesn't handle resizing very well without manually changing the settings, you can't just drag it around or double click to full screen.
No.. the sessions I create work just fine.. it's only the RDM shell from the toolbar that seems to have the issue. I don't see any options for the embedded session.
Thank you,
David F.
No problem about the hijacking :-) And it turned me on to another utility which looks like it will have a lot of potential for me, and do a lot of what I want (cmder) :cool:
David F.
Hi David,
We will add the options to disable the resize window and debug when the PowerShell console is created via the ribbon.
Best regards,
Olivier Désalliers
Thank you! I'm really looking forward to it..
David F.
Hi David,
The options will be available in File->Options->Tools, under the section "PowerShell (RDM CmdLet)". You will just have to uncheck the options "Debug" and "Resize Window".
It should be available in the next RDM version.
Best regards,
Olivier Désalliers
Ok.. that should help :-)
Thank you.. I'm hoping you guys will get the resizing fixed, or just follow the existing embedding resizing since we know that works like a champ. But in the mean time, this sounds perfect.
David F.