icinga-powershell-framework/doc/10-Install-Service.md

39 lines
1.4 KiB
Markdown
Raw Normal View History

2018-11-06 11:14:49 -05:00
Run the PowerShell Module as Windows Service
2019-10-21 09:18:51 -04:00
===
2018-11-06 11:14:49 -05:00
Requirements
2019-10-21 09:18:51 -04:00
---
2018-11-06 11:14:49 -05:00
As PowerShell Scripts / Modules can not be installed directly as Windows Service, we will require a little assistance here.
In order to make this work, you will require the Icinga Windows Service which can be downloaded directly from the [GitHub Repository](https://github.com/Icinga/icinga-powershell-service).
2018-11-06 11:14:49 -05:00
Install the Service
2019-10-21 09:18:51 -04:00
---
2018-11-06 11:14:49 -05:00
At first you will require the Service Binary from the [Icinga Windows Service GitHub Repository](https://github.com/Icinga/icinga-powershell-service) and copy the binary locally to your system. A recommended path would be your Program Files / Program Files (x86) directory.
2018-11-06 11:14:49 -05:00
2019-11-04 04:08:46 -05:00
Any other custom location is fully supported, has to be however accessible from the Windows Service Environment.
2018-11-06 11:14:49 -05:00
Once you have found a location, the PowerShell Module will assist you with setting up the service itself. In this documentation we will assume the path you have chosen to copy the binary to is
2019-10-21 09:18:51 -04:00
```powershell
C:\Program Files\Icinga-Framework-Service
2018-11-06 11:14:49 -05:00
```
and the binary name is
2019-10-21 09:18:51 -04:00
```powershell
icinga-service.exe
2018-11-06 11:14:49 -05:00
```
Now lets install the service with the help of the PowerShell Module:
```powershell
2019-11-04 09:53:05 -05:00
Install-IcingaFrameworkService -Path 'C:\Program Files\Icinga-Framework-Service\icinga-service.exe'
2018-11-06 11:14:49 -05:00
```
You can validate if the service has been installed properly by using the Get Service Cmdlet:
2019-10-21 09:18:51 -04:00
Each enabled background daemon component is afterwards being started and executed.