First of all extract Sitecore Publishing Service 2.2.0 rev. 171220.zip into convenient location. I extracted mine into my project which I keep in git so everyone who needs to install locally our custom SPS can quickly clone the repo and run the script.

Lets extract it to a folder C:\SPSProject\PublishingService and create a powershell script in C:\SPSProject\InstallSPS.ps1

If you are using Application Insights you can add your custom files like Serilog Sink for Application Insights. Serilog will give you way more control over logs. I recommend it because the solution for Application Insights provided by Sitecore is very poor.

First I check for optional arguments in the command line. I allow to run it with --Force (to overwrite existing files in the folder with previously installed SPS). I use Serilog Sink and allow to install SPS with Instrumentation Key, if not provided AppInsights logs will be disabled.

Last parameter is the instance name, it may come in handy if you want to install multiple SPS on your machine.