Posts: 7
Threads: 2
Joined: Feb 2018
Reputation:
0
In the 2012 version we could add new connections to the database easily.
In 2017 ASG-RemoteDesktop I see the schema change is different and looks encrypted.
I am looking at a way to add new connections via our provisioning process. Is there a stored procedure we can pass in the connection info, or another way.
Please advise.
gb
Posts: 11,246
Threads: 102
Joined: Aug 2006
Reputation:
206
You should look at the PowerShell-API - there you have programmatically access to all objects in the database
Regards/Gruss
Oliver
Posts: 11,246
Threads: 102
Joined: Aug 2006
Reputation:
206
Did you set the working dir correctly? It is explained in online help file - just try the following script
$workingdir = "Program Files (x86)\ASG-Remote Desktop 2018\"
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 Dev -PassThrough
Regards/Gruss
Oliver
Posts: 11,246
Threads: 102
Joined: Aug 2006
Reputation:
206
Did you try without quotation marks? Only DEV as parameter
Regards/Gruss
Oliver
Posts: 11,246
Threads: 102
Joined: Aug 2006
Reputation:
206
I tried on a test machine and run into the same issue - I will check that and return asap
Regards/Gruss
Oliver
Posts: 11,246
Threads: 102
Joined: Aug 2006
Reputation:
206
Ok, I was on the wrong machine and had the environment I tried to open not in the environment list - as I get the same error as you - Can you check that your environment "DEV" is in the list of Environments when you open Environment Manager in ASG-RD?
You also should check that you run the correct Powershell version - if you have ASGRD installed as 32bit app you need to start the x86 powershell - and of course if you installed x64 you can use Powershell (x64)!
Regards/Gruss
Oliver
Posts: 11,246
Threads: 102
Joined: Aug 2006
Reputation:
206
Sorry but in screenshot it looks like you typed / instead of l - many users are using Powershell API - so it can't be that the first command is not working
Regards/Gruss
Oliver
Posts: 11,246
Threads: 102
Joined: Aug 2006
Reputation:
206
You also should be able to connect to a file base environment - just create one (name Standard) and try again - it should really work
Regards/Gruss
Oliver
Posts: 7
Threads: 2
Joined: Feb 2018
Reputation:
0
OMG you are so right. They used an "/" in the environment name. That is so stupid. The command runs now.
Now to figure out how to get a new connection added.
Posts: 11,246
Threads: 102
Joined: Aug 2006
Reputation:
206
Ok :-) Great - let me know if you have some more questions :-)
Regards/Gruss
Oliver