Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Powershell error launching ASG Remote Desktop 2018 shell
#1
I get the following error every time I launch my ASG Remote Desktop Powershell prompt.

import-module : Could not load file or assembly 'CloudAdminAPI, Version=11.0.6104.1, Culture=neutral,
PublicKeyToken=8dc24a72506dc878' or one of its dependencies. The system cannot find the file specified.
At line:1 char:56
+ [reflection.assembly]::loadFrom('.\ASGRD-PSAPI.dll') | import-module
+ ~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Smile [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand

How do I resolve this?
Reply
#2
Can you try to create a ps1 file instead of using the shortcut - I will check why the shortcut is not working anymore

Just put in these lines of code (check the name of the working dir and the environment name you want to open)

$workingdir = "\Program Files\ASG-Remote Desktop 2018 (x64)\"

Set-Location $workingdir
[Environment]::CurrentDirectory = Get-Location -PSProvider FileSystem

$path = $workingdir + "ASGRD-PSAPI.dll"

Add-Type -path $path
[reflection.assembly]::LoadFrom($path) | Import-Module

Connect-RDEnvironment -Environment >YourEnvironment< -PassThrough
Regards/Gruss
Oliver
Reply
#3
Check the properties of your shortcut - I think it is linked to the 32bit version of PowerShell - replace the path with

C:\Windows\System32\WindowsPowerShell\v1.0
Regards/Gruss
Oliver
Reply
#4
(07-12-2018, 12:27 PM)DevOma Wrote: Check the properties of your shortcut - I think it is linked to the 32bit version of PowerShell - replace the path with

C:\Windows\System32\WindowsPowerShell\v1.0

I tried creating the script you suggested putting together. It's attached to this reply. It still failed. I captured screenshots and saved them to a file also attached.  Any other ideas?


Attached Files
.txt   Launch-ASGRDPosh.ps1.txt (Size: 338 bytes / Downloads: 3)
.docx   ASGRD-launch-error-2018-12-10.docx (Size: 58.58 KB / Downloads: 2)
Reply
#5
(07-12-2018, 12:27 PM)DevOma Wrote: Check the properties of your shortcut - I think it is linked to the 32bit version of PowerShell - replace the path with

C:\Windows\System32\WindowsPowerShell\v1.0

I tried creating the script you suggested putting together. It's attached to this reply. It still failed. I captured screenshots and saved them to a file also attached.  Any other ideas?


Attached Files
.docx   ASGRD-launch-error-2018-12-10.docx (Size: 58.58 KB / Downloads: 3)
.txt   Launch-ASGRDPosh.ps1.txt (Size: 338 bytes / Downloads: 3)
Reply
#6
Did you check that you are using the 64bit PowerShell? Else the LoadModule will fail to load the 64bit API
Regards/Gruss
Oliver
Reply




Users browsing this thread: 2 Guest(s)