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

Topic "RDM CMDlets under 64 bit" a message from Peter Cermak

$
0
0
Hi, i just thought i share this tiny bit of code.

Explanation: RDM cmdlets do NOT load in 64 bit Powershell.

I use this to run my New-Session script from standard 64 bit Powershell environment.
supports all Parameters


if ([Environment]::Is64BitProcess) {
$Myself = $Myinvocation.line
Write-Host &quot.Running in 64 Bit, Restarting in 32 bit '$Myself'&quot
& $env:windir\syswow64\WindowsPowerShell\v1.0\powershell.exe $Myself
return 0
}


$RDMSnapin = Get-PSSnapin -Name *Remote.Desktop* -Registered -ErrorAction SilentlyContinue | sort version -Descending | select -First 1
Add-PSSnapin $RDMSnapin -ErrorAction SilentlyContinue
$AddRC = (Get-Command *rdm*).count

Write-Host &quot.Adding RDM Snapin: $($RDMSnapin.Name), Loaded cmdlets: $AddRC&quot
[/CODE]

Viewing all articles
Browse latest Browse all 19717

Trending Articles