6

Announcing PowerShell Information Server (PSIS)

Johan Akerstrom – PowerShell expert from Sweden – released a PowerShell module that can be used to start a PowerShell-based web server. He preferred to call it a PowerShell Information Server (PSIS). Although, I am not really sure about the name given to it, I completely love the concept and work he did.

This module is available on Github. It is very easy to use and work with.

Invoke-PSIS -URL "http://*:8087/" -AuthenticationSchemes negotiate -ProcessRequest {
    Write-Verbose $request.RequestBody
    Get-Service $request.RequestObject.ServiceName
} -Verbose -Impersonate

This gets the web server started. The -ProcessRequest is what gets executed when a request arrives at the web server. So, in my example, I am just getting the service information.

We can call the end point we just started using the Invoke-RestMethod cmdlet.

$data = [pscustomobject]@{
   ServiceName = "winmgmt"
}
$postData = $data | ConvertTo-Json
Invoke-RestMethod -Method post -Uri 'http://localhost:8087/json' -UseDefaultCredentials -Body $postData | ConvertTo-Json

I already have a list of things I want to try. Go ahead and try the module and leave your feedback for Johan.

Filed in: News Tags: ,

5 Pingbacks/Trackbacks

6 Responses to "Announcing PowerShell Information Server (PSIS)"

  1. Ravikanth,

    I can agree that the name is pretty bad but it is a pun on IIS of course. Anyone got any good name suggestions? I was thinking of maybe calling it Proto instead. Invoke-ProtoServer? Or Invoke-CKProto, following the naming convention with a qualifying company prefix (My company and GitHub account is called CosmosKey). Something along that way? What do you guys say?

Leave a Reply

Submit Comment

© 7690 PowerShell Magazine. All rights reserved. XHTML / CSS Valid.
Proudly designed by Theme Junkie.
%d bloggers like this: