I've got a
I believe you need to add a MIME type for .ps1. In your IIS Manager, select the server node on the tree, and click "MIME Types". Then click "Add..." on the right panel. For extension, set it to
.ps1, and set the MIME type to
Now IIS should serve .ps1 files.
You could use a MIME Type of
application/octet-stream instead of
text/plain. Using the former will cause most browsers to download it rather than try to display it.
You can do this for a specific web application or virtual directory, too. If you are doing this through web.config, it would look something like this:
<configuration> <system.webServer> <staticContent> <mimeMap fileExtension=".ps1" mimeType="text/plain" /><!-- or application/octet-stream --> </staticContent> </system.webServer> </configuration>