Quantcast
Channel: Devolutions Forum - Recent Posts
Viewing all articles
Browse latest Browse all 19717

Topic "Powershell tab" a message from Stéfane Lavergne

$
0
0
Hi all,

v9.2 (available here) now has a few new PowerShell session features (v9.2 change history available here)
  • Added a PowerShell setting to show debug
  • Added a setting in the PowerShell session to force window resize (buffer & window)
  • Added option to load RDM CmdLet Snap-in in a PowerShell session
  • Fixed issue where RDM CmdLet Snap-in didn't load in 64-bit mode


This is currently only available in the PowerShell session not the tools type sessions. It's all I was able to squeeze into the latest build.

How does it work? We inject the two lines of code (suggested by Peter Cermak)
$Host.UI.RawUI.BufferSize = new-object System.Management.Automation.Host.Size PowerShellBufferSizeCols, PowerShellBufferSizeRows
$Host.UI.RawUI.WindowSize = new-object System.Management.Automation.Host.Size PowerShellWindowSizeCols, PowerShellWindowSizeRows
The variables PowerShellBufferSizeCols, PowerShellBufferSizeRows, PowerShellWindowSizeCols & PowerShellWindowSizeRows are in fact system options with default values of 250, 4000, 250 & 84 respectively. They can be modified via the RemoteDesktopManager.cfg file by adding the appropriate xml tags example:
<PowerShellBufferSizeCols>180</PowerShellBufferSizeCols>



The resize code has a small issue where sometimes the UI doesn't resize the window to fit, even though the buffer has been set properly, for the time being simply resize the tree view and all is good, happens about 15% of the time, I'm still investigating.


If you use the &quotLoad RDM CmdLet (Snap-in) option, the session may be forced to start with elevated privileges. This will only happen the first time since the snap-in must be registered prior to it being loaded.


Please let me know what you think.


Regards,

Viewing all articles
Browse latest Browse all 19717

Trending Articles