cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IdentityIQ: Calling PowerShell script fails, “Could not load file or assembly 'utils.dll' "

IdentityIQ: Calling PowerShell script fails, “Could not load file or assembly 'utils.dll' "

Symptoms

When attempting to user PowerShell through IQService, the script fails and returns an error of the form “Could not load file or assembly 'utils.dll' or one of its dependencies."

 

Diagnosis

There are several root causes that can result in this behavior. To help diagnose the cause, refer to the following steps:

  1. On the IQService host, locate the Utils.dll file in the IQservice directory.
  2. Right click the file and choose Properties.
  3. Check the General and Security tabs of the Properties window to ensure the .dll file is not blocked by Windows security settings.
  4. If you have any antivirus or other endpoint protection, ensure the Utils.dll file is whitelisted and .dll files in general are not categorically disabled.
  5. Restart IQService.

If the above steps did not identify or resolve the error, it may be an issue caused by incompatible versioning. To determine if this is the cause:

  1. On the IQService Host, run the following PowerShell command:
    echo $PSVersionTable.CLRversion​

    Alternatively, add this information to your logging by adding the following line to one of the native Active Directory rules that executes IQService:

    Writelog INFO CLRVersion $($PSVersionTable.CLRVersion)
  2. If the returned Common Language Runtime (CLR) is old (2.0.x instead of 4.0.x) you will need to update your configuration files.

 

Solution

  1. Create a text file with the name powershell.exe.activation_config in the IQService root directory (typically C:\IQService). The contents should read
    <?xml version="1.0"?>
    <configuration>
      <startup useLegacyV2RuntimeActivationPolicy="true">
      <supportedRuntime version="v4.0.30319"/>
      <supportedRuntime version="v2.0.50727"/>
      </startup>
    </configuration>​
  2. On the IQService host, add a Windows environment variable named COMPLUS_ApplicationMigrationRuntimeActivationConfigPath with the value set to the IQService root directory (typically C:\IQService) you located in the previous step.
  3. Restart IQService.
Labels (2)
Version history
Revision #:
3 of 3
Last update:
‎Jul 13, 2023 05:29 PM
Updated by: