PS2EXE v0.2.0.0: Improvements: Platform switch (x64 or x86 or AnyCPU), new “EXE.config” file for “supported runtime”

(Original article:

I have implemented some new switches for PS2EXE:


This compiles the EXE to be run as 32 bit application also on 64 bit OS.


This compiles the EXE to be run as 64 bit application. Therefore an 64 bit OS ist necessary.


This creates an “.exe.config” file with this content:

      <supportedRuntime version="v2.0.50727"/>

Please read this article on MSDN

this may fix some errors that users reported to me.


You can download the new version ouf PS2EXE here:

Error in crawl log: “The SharePoint item being crawled returned an error when attempting to download the item”

Another error in the crawl log:


Using Fiddler I figured out that the pages report an “incompatible browser” error if the SharePoint crawler opens that pages. It seems that the gantt view only renders content for an up-to-date Internet Explorer – identified by the user agent.

The solution is to change the user agent used by the SharePoint crawler component.

Microsoft’s “procmon” showed me this registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\14.0\Search\Global\Gathering Manager\UserAgent

I set this to the IE9 user agent string found here:


Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)

After the next crawl the errors related to this problem where gone.

Error in crawl log: “The server is unavailable and could not be accessed. The server is probably disconnected from the network.” (SharePoint 2010)

I got this error messages a thousand times:


Solution 1:

I added the root certification authority certificates and the intermediate certification authority certificates of all SSL certificates to the SharePoint root cert store:

$rootca = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("$(join-path (split-path $MyInvocation.MyCommand.Path) 'root-ca.cer')") 
$interca = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("$(join-path (split-path $MyInvocation.MyCommand.Path) 'inter-ca.cer')") 

New-SPTrustedRootAuthority –Name "GlobalSign Root CA" –Certificate $rootca 
New-SPTrustedRootAuthority –Name "GlobalSign Domain Validation CA" –Certificate $interca 

In my case both certificates are saved as CER files in the same directory as the script file above.


To get the root and intermediate CA cert open the Internet Explorer and navigate to the SharePoint site.

Click the “Security Report” button:


Click “View certificates”


Select every certificate in the tree but not the last level: this last certificate is your SSL certificate itself. The top certificate is the “root certification authority certificate” and all certificates (1 or more) between the top node and the “last” certificate are the “intermediate certification authority certificates”. Select each of them and click “View Certificate”.


In the next dialog click “Details” and then click “Copy to file”


Solution 2:

Maybe this is another solution for the problem.

First open the Farm Search Administration page (http(s)://<ca>:<port>/searchfarmdashboard.aspx).

Then change the setting “Ignore SSL warnings” to “yes”: