16-06-2016, 03:54 PM
Has anyone been able to get the powershell to work with Microsoft Orchestrator? We automate our VM creating process and one of the steps we have been waiting to complete is creating an object in ASG for the new VM's created. No matter which way we try we keep getting errors.
Error
Exception calling "LoadFrom" with "1" argument(s): "Could not load file or assembly 'file:///C:\Program Files (x86)\ASG-Remote Desktop 2016\ASGRD-PSAPI.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded."
Script:
[reflection.assembly]::loadFrom( 'C:\Program Files (x86)\ASG-Remote Desktop 2016\ASGRD-PSAPI.dll' ) | import-module
Connect-RDEnvironment -Environment "ASG" -PassThrough
New-RDBaseItem -ParentItemId 097b0ae5-84f7-4561-a3f1-126d9e9ca15c -ItemType Connection -Text test98899 -Description "description"
Error
Exception calling "LoadFrom" with "1" argument(s): "Could not load file or assembly 'file:///C:\Program Files (x86)\ASG-Remote Desktop 2016\ASGRD-PSAPI.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded."
Script:
[reflection.assembly]::loadFrom( 'C:\Program Files (x86)\ASG-Remote Desktop 2016\ASGRD-PSAPI.dll' ) | import-module
Connect-RDEnvironment -Environment "ASG" -PassThrough
New-RDBaseItem -ParentItemId 097b0ae5-84f7-4561-a3f1-126d9e9ca15c -ItemType Connection -Text test98899 -Description "description"