thordreier / PowerShellCGI

Run PowerShell CGI scripts in IIS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:\inetpub\bin and copy CGIwrap.exe into this directory.

IIS

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

01.png

02.png

03.png

04.png

05.png

06.png

07.png

08.png

09.png

10.png

About

Run PowerShell CGI scripts in IIS

License:MIT License


Languages

Language:PowerShell 61.8%Language:C# 34.5%Language:Batchfile 3.7%