简体   繁体   中英

Invoke a powershell script from IIS

The 3rd party git repository service I use provides post-commit hook where it will post the commit details in JSON to specified URL.

Most of build automation is via powershell (pull from git repo, build, copy artifacts). What Id like to be able to do is somehow launch the powershell script when the specified URL is hit. Im struggling to think what the best way (and most secure) to accomplish this would be. A simple aspx page hosted in IIS that launches powershell buildproj.ps1 with suitable security permissions and IP lock down?

You can host the PowerShell engine within your ASPX code. You would need to use IIS/ASPX mechanisms for IP lock down and authentication/authorization for the URL.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM