AssetWise CONNECT Edition Implementation Guide

PowerShell Script Errors

The following table lists possible error messages that may occur when running PowerShell scripts, and their solutions.
Error Message Solution
Connecting to remote server failed with the following error message: The WinRM client cannot process the request. If the authentication scheme is different from Kerberos, or if the client computer is not joined to a domain, then HTTPS transport must be used or the destination machine must be added to the TrustedHosts configuration setting. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated. In settings.xml, use the server's IP address as the MachineName value.
… cannot be loaded because the execution of scripts is disabled on this system. Run Set-ExecutionPolicy RemoteSigned from the PowerShell command prompt, and enter Yes when prompted.
Could not load file or assembly 'file:///C:\Program Files\Bentley\eB\Server\eB.Common.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

PowerShell is not configured to run with .NET 4.x. The PowerShell config file must be updated.

<?xml version="1.0"?> 
<configuration>     
     <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0.30319"/>
        <supportedRuntime version="v2.0.50727"/>
     </startup>
</configuration

For more information see: http://viziblr.com/news/2012/5/16/the-easy-way-to-run-powershell-20-using-net-framework-40.html