Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Powershell API with Powershell ISE
#1
I can get the API working when starting the 32 bit powershell from the command prompt.

However when running the 32 bit Powershell ISE and doing the same thing it just hangs (tryed running it as Administrator as well)
http://imgur.com/a/wHSN3


What am I doing wrong?
Reply
#2
The problem is the working dir - we reference some of the DLL's of the product and if you are not in the right working dir, it will not work - this is on the feature/todo-list - perhaps you can try to SET PATH variable to program files folder of ASG-RD...
Regards/Gruss
Oliver
Reply
#3
As you see from the screenshot I'm already in the "ASG-Remote Desktop 2016" directory where the dlls are located. I added the path to the Environment variables but still no luck.
Reply
#4
Here is a working example that should help you


$workingdir = "Program Files (x86)\ASG-Remote Desktop 2016\"

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 Test -PassThrough
Regards/Gruss
Oliver
Reply
#5
That works, thanks!
Reply




Users browsing this thread: 1 Guest(s)