Posts: 10,628
Threads: 91
Joined: Aug 2006
Reputation:
181
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
Posts: 34
Threads: 11
Joined: Jan 2017
Reputation:
0
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.
Posts: 10,628
Threads: 91
Joined: Aug 2006
Reputation:
181
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