https://github.com/flowerinthenight/psscript-exec-http
A simple client/server tool for executing powershell script over http.
https://github.com/flowerinthenight/psscript-exec-http
csharp http powershell
Last synced: 5 months ago
JSON representation
A simple client/server tool for executing powershell script over http.
- Host: GitHub
- URL: https://github.com/flowerinthenight/psscript-exec-http
- Owner: flowerinthenight
- License: mit
- Created: 2016-08-02T03:17:34.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-14T23:40:58.000Z (over 8 years ago)
- Last Synced: 2025-01-08T07:44:38.501Z (6 months ago)
- Topics: csharp, http, powershell
- Language: C#
- Size: 21.5 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://ci.appveyor.com/project/flowerinthenight/psscript-exec-http/branch/master)
# PSScriptExecHttp
A simple client/server tool for executing powershell script over http. You can run the tool as the server, which in turn will run the predefined powershell script `runscript.ps1` upon request. You can also use the same tool as a client to request a running server to execute the script.
## Prerequisite
* To build the tool, you need to download the required NuGet packages.
* To run the tool, you need to copy the provided sample `runscript.ps1` file to the same location as the executable.## Display help information
```
PSScriptExecHttp.exe --help
```## (Example) Run as a server
```
PSScriptExecHttp.exe --server
```To terminate the server, press `Ctrl+C`.
## (Example) Run as a client tool
```
PSScriptExecHttp.exe --host localhost --url /runscript --query "param1:value1^param2:value2^param3:value3" --timeout 10000
```The sample `runscript.ps1` file accepts three parameters, $Param1, $Param2, and $Param3, prints them and then returns the printed output back to client. You can edit the script however you want with different parameters. And to provide those parameters from the client, use the `--query` option.
# License
[The MIT License](./LICENSE.md)