Created
May 28, 2019 10:29
-
-
Save Stephanevg/f8df25a7a01c8c0fca075098a10500bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module C:\Users\taavast3\OneDrive\Repo\Projects\OpenSource\PSHTML\PSHTML\PSHTML.psd1 -Force | |
Import-Module Polaris -Force | |
New-PolarisGetRoute "/" -Scriptblock { | |
$GroupName = "TestGroup" | |
$HTML = .\Routes\LocalUserView.ps1 -GroupName $GroupName | |
$Response.SetContentType('text/html') | |
$Response.Send($HTML) | |
} -Force | |
New-PolarisGetRoute "/LocalUserView" -Scriptblock { | |
$HTML = .\Routes\LocalUserView.ps1 -GroupName $GroupName | |
$Response.SetContentType('text/html') | |
$Response.Send($HTML) | |
} -Force | |
New-PolarisPostRoute "/removeuser" -Scriptblock { | |
$HTML = .\Routes\RemoveUser.ps1 -GroupName $GroupName | |
$Response.SetContentType('text/html') | |
$Response.Send($HTML) | |
} -Force | |
New-PolarisPostRoute "/adduser" -Scriptblock { | |
$HTML = .\Routes\AddUser.ps1 -GroupName $GroupName | |
$Response.SetContentType('text/html') | |
$Response.Send($HTML) | |
} | |
$App = Start-Polaris -Port 8080 -Verbose -UseJsonBodyParserMiddleware | |
$App |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment