Set Mailbox language in MS Exchange 2010

Hey everyone,

in One Identity 7.1.2 we are trying to set the language of a MS Exchange 2010 Mailbox via process. We set the process step with the function "PowerShellComponent - Execute Script" with the Parameters:

- Script -> Value = "set-Mailbox " & $Alias$ & " -Languages de-DE"

- AddSnapin -> Value ="Microsoft.Exchange.Management.PowerShell.E2010"

We did also install the Exchange Management Console and the mentioned SnapIn on the relevant Jobserver.

Unfortunately the process runs into an error with following message:

"Last action taken by target system provider was: 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."

 

Is this issue known to anyone?

 

Thanks in advance,

Niko

  • Hi, Niko!

    The error message "Last action taken by target system provider was: 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." you get is returned by PowerShell assemblies.

    On a quick research I found https://github.com/chocolatey/choco/issues/640

     

    Please try to execute your powershell component in version 2.

     

    Best regards

    Stefan

  • In reply to Stefan Dohnal:

    Good morning Stefan,

    thank you for your suggestion. It was the right way, but we already solved the issue :)

    Solution:
    1. Write a powershell script:
    Param
    (
    [string]
    )
    Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
    Set-Mailbox $Alias –Languages de-DE

    2. Import the script into the 1IM database
    3. Adjust the process "EX0_2010_EX0Mailbox_Insert/HandleOutstanding":
    - Prozessfunction > CommandComponent – Execute
    - Parameter > CMDline > Value = „powershell.exe –version 2.0 –file .\<Dateiname>“ & $Alias$



    Thanks and best regards

    Niko