PowerShellCGI

其他类别 2025-07-22

PowerShellCGI

Why would anyone ever want to create a webpage served by PowerShell code?

I got 99 reasons but speed ain’t one!

(and you probably get more than 99 problems trying to do something serious with this)

Setup

It’s tested on Windows Server 2019/Internet Information Services (IIS) version 10.

Running .bat or .cmd files as CGI script just work, but for some reason it’s not the case with .ps1 files.

Other persons have similar issues.

This small C# program can fix the issue.

Compile it by running CGIwrap.compile.cmd, make directory C:inetpubbin and copy CGIwrap.exe into this directory.

IIS

Here’s some screenshots from IIS to show how it’s set up.

下载源码

通过命令行克隆项目:

git clone https://github.com/thordreier/PowerShellCGI.git