Skip to content

Instantly share code, notes, and snippets.

@Outek
Outek / InstallNodeAppAsWindowsService.ps1
Last active December 1, 2016 12:47 — forked from a5ync/InstallNodeAppAsWindowsService.ps1
Powershell wrapper over NSSM (Non-Sucking Service Manager), to install Node app as a Windows-Service
Function Install-Service {
param(
[Parameter(Mandatory=$true)][string]$NSSMPath,
[Parameter(Mandatory=$true)][string]$serviceName ,
[Parameter(Mandatory=$true)][string]$serviceExecutable ,
[Parameter(Mandatory=$false)][string]$serviceExecutableArgs ,
[Parameter(Mandatory=$false)][string]$serviceAppDirectory,
[Parameter(Mandatory=$false)][string]$serviceDescription
)