Morning,
Since updating Adaxes to the latest version that uses Powershell 4.0 we are unable to query SQL 2008 R2 database in a scheduled task.
The Activity History provides the following error:
Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information. Stack trace: at <ScriptBlock>, <No file>: line 20
This is a sample of the script we are trying to run:
1: Import-Module Adaxes
2: add-pssnapin sqlserverprovidersnapin100
3: add-pssnapin sqlservercmdletsnapin100
...
20: $list= invoke-sqlcmd -query "SELECT ..." -Database 'DB' -ServerInstance 'Server' -Username 'User' -Password 'Pass'
Seems like we should be able to update a .config file to support mixed mode?
https://stackoverflow.com/questions/642 ... he-runtime
Any assistance would be appreciated.
Regards, Ben