I have made a couple of minor updates to the prerequisite installation script. One is changing the way the source directory is determined. Instead of hardcoding the directory, the directory that the script is running from will be used. This allows you to simply put all files in the same directory as the script and run it from anywhere (except for UNC).

Another change is a correction when checking for installation binaries. I failed to account for the backslash between the directory and the filename so, even when the file exists, the script wouldn’t see it.

The last change is moving the NETTCPPortSharing service setting after the Windows components installation completes so that the setting is immediately configured. This allows you to begin the Exchange installation without rebooting.

The download and inline code from the original post have been updated.

Cool script, but it’s FYI not working with Wind2K8 R2. It thinks it needs to install the Windows Management Framework, which isn’t applicable to Win2K8 R2 as it has those components already. It insists that’s not installed, and then attempts to download and install it. The file it downloads won’t install because it wasn’t intended for Win2K8 R2. Probably need to do a conditional statement to only do that if it’s Win2K8 and not R2.