Published: 2018.02.15
Category: PowerShell
Install Service
Install service is a wrapper around InstallUtil.exe file. It exposes three functions:
- Install-Service – it invokes InstallUtil.exe pathToExecutable command
- Install-ServiceIfNotInstalled – first it checks if service is installed if not perform the method Install-Service
- Uninstall-Service – it uninstalls service. ServiceName of path to executable can be used.
Install-Service -ExePath d:\bin\SimpleMarketPlace\Team-Managment\PSTeamManagement.WindowsService.exe -Verbose

Install-ServiceIfNotInstalled -ExePath d:\bin\SimpleMarketPlace\Team-Managment\PSTeamManagement.WindowsService.exe -Verbose

