Forum / Remote Desktop Manager - Feature Request

Proper powershell path and module

  • Create an Issue
  • Cancel

Use of snapins is deprecated. Modules are the way to go.
And then please put the modules in the default path (%PSModulePath% - preferably in Program files or System32 so it's systemwide)

That way the cmdlets can be used in Powershell out-of-the box. Powershell autoscans path for modules and loads the module dynamically when you use a cmdlet contained in an Module which is not yet loaded.

Then there is also no need for al of this;

Installing RDM PowerShell Cmdlet snapin

You have two ways of installing the RDM PowerShell Cmdlet snapin. The simplest, start PowerShell using the menu Tools - PowerShell (RDM Cmdlet) from within RDM. This will automatically register the Cmdlet and load the snapin ready for use. The second is using a script similar to this:

set-alias installutil "$([System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory())installutil.exe" ;installutil ' InstallPath \RemoteDesktopManager.PowerShell.dll';Get-PSSnapin -Name *Remote.Desktop* -Registered | % { Write-Host "$_..." -NoNewline; if ( (Get-PSSnapin -Name $_ -ErrorAction SilentlyContinue) -eq $null ) { Write-Host "installing" -ForegroundColor Yellow; Add-PsSnapin $_ } else { Write-Host "already installed" -ForegroundColor Green; } }
Install & load snapin (you must change the installpath)

Registration must only be done the first time. From now on running the following script will suffice. Adding the following to your PowerShell profile will make things much simpler.

Get-PSSnapin -Name *Remote.Desktop* -Registered | % { Write-Host "$_..." -NoNewline; if ( (Get-PSSnapin -Name $_ -ErrorAction SilentlyContinue) -eq $null ) { Write-Host "installing" -ForegroundColor Yellow; Add-PsSnapin $_ } else { Write-Host "already installed" -ForegroundColor Green; } }
Load snapin

Clock4 yrs

Hi,

We will enter a feature request for that.

Best regards,

Olivier Désalliers

signaturesignature

Clock4 yrs