PowerShell error

avatar

Hi!

Anyone also having trouble with Powershell Cmdlets?
This is my result when trying to get RDM CmdLets going:


PS C:\Users\SVG1> set-alias installutil "$([System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory())installutil.exe"
PS C:\Users\SVG1> installutil 'c:\Program Files (x86)\Devolutions\Remote Desktop Manager\RemoteDesktopManager.PowerShell.dll';
Microsoft (R) .NET Framework Installation utility Version 2.0.50727.5483
Copyright (c) Microsoft Corporation. All rights reserved.

Exception occurred while initializing the installation:
System.BadImageFormatException: Could not load file or assembly 'file:///c:\Program Files (x86)\Devolutions\Remote Desktop Manager\RemoteDesktopManager.PowerShell.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded..
PS C:\Users\SVG1> 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; } }
>>
Get-PSSnapin : No Windows PowerShell snap-ins matching the pattern '*Remote.Desktop*' were found. Check the pattern and then try the command again.
At line:1 char:13
+ Get-PSSnapin <<<< -Name *Remote.Desktop* -Registered | % { Write-Host "$_..." -NoNewline;
+ CategoryInfo : InvalidArgument: (*Remote.Desktop*:String) [Get-PSSnapin], PSArgumentException
+ FullyQualifiedErrorId : NoPSSnapInsFound,Microsoft.PowerShell.Commands.GetPSSnapinCommand



Hope anyone has a solution.

Cheers!

Sjoerd

All Comments (4)

avatar

Hello,

The error message points to the .net framework being too old, does RDM run without issues on that machine?

Best regards,

Maurice

avatar

No problems there...
I have .NET FW 4.5.2 installed.

Cheers!

Sjoerd

avatar

Maurice,

Which .NET version should I have. I think 4.5.2 is the latest. Any ideas what else could be causing this issue?

Cheers!

Sjoerd

avatar

Solved: Windows Management Framework 4.0 needed to be installed in order for Powershell 4.0 to be available on W7...

Cheers!

Sjoerd