-
-
Notifications
You must be signed in to change notification settings - Fork 88
Servy PowerShell Module
Akram El Assas edited this page Sep 16, 2025
·
113 revisions
The Servy PowerShell Module Servy.psm1 allows you to manage Windows services easily using PowerShell. You can install, start, stop, restart, export/import configurations, check service status, show help, display the version, and uninstall services.
You can find detailed examples of how to use the Servy PowerShell module here.
Import the module in your PowerShell session:
Import-Module .\Servy.psm1 -ForceDisplay the version:
Show-ServyVersionDisplay help:
Show-ServyHelpInstall-ServyService `
-Name "WexflowServer" `
-Description "Wexflow Workflow Engine" `
-Path "C:\Program Files\dotnet\dotnet.exe" `
-StartupDir "C:\Program Files\Wexflow Server\Wexflow.Server" `
-Params "Wexflow.Server.dll" `
-StartupType "Automatic" `
-EnableHealth `
-HeartbeatInterval 5 `
-MaxFailedChecks 1 `
-MaxRestartAttempts 2 `
-RecoveryAction RestartServiceExport-ServyServiceConfig `
-Name "WexflowServer" `
-ConfigFileType "xml" `
-Path "C:\WexflowServer.xml"
Export-ServyServiceConfig `
-Name "WexflowServer" `
-ConfigFileType "json" `
-Path "C:\WexflowServer.json"Import-ServyServiceConfig `
-ConfigFileType "xml" `
-Path "C:\WexflowServer.xml"
Import-ServyServiceConfig `
-ConfigFileType "json" `
-Path "C:\WexflowServer.json"Start-ServyService -Name "WexflowServer"
Get-ServyServiceStatus -Name "WexflowServer"
Stop-ServyService -Name "WexflowServer"
Restart-ServyService -Name "WexflowServer"Uninstall-ServyService -Name "WexflowServer"| Cmdlet | Parameters | Description |
|---|---|---|
| Install-ServyService | -Name (string, required)-Description (string, optional)-Path (string, required)-StartupDir (string, optional)-Params (string, optional)-StartupType (string, optional: Automatic, Manual, Disabled)-ProcessPriority (string, optional: Idle, BelowNormal, Normal, AboveNormal, High, RealTime)-StdoutPath (string, optional)-StderrPath (string, optional)-EnableRotation (switch, optional)-RotationSize (int, optional)-EnableHealth (switch, optional)-HeartbeatInterval (int, optional)-MaxFailedChecks (int, optional)-RecoveryAction (string, optional: None, RestartService, RestartProcess, RestartComputer)-MaxRestartAttempts (int, optional)-EnvironmentVariables (string, optional)-ServiceDependencies (string, optional)-User (string, optional)-Password (string, optional)-PreLaunchPath (string, optional)-PreLaunchStartupDir (string, optional)-PreLaunchParams (string, optional)-PreLaunchEnv (string, optional)-PreLaunchStdout (string, optional)-PreLaunchStderr (string, optional)-PreLaunchTimeout (int, optional)-PreLaunchRetryAttempts (int, optional)-PreLaunchIgnoreFailure (switch, optional) | Installs a new Windows service with the specified parameters. |
| Uninstall-ServyService | -Name (string, required) | Uninstalls a Windows service by name. |
| Start-ServyService | -Name (string, required) | Starts a Windows service. |
| Stop-ServyService | -Name (string, required) | Stops a Windows service. |
| Restart-ServyService | -Name (string, required) | Restarts a Windows service. |
| Get-ServyServiceStatus | -Name (string, required) | Gets the current status of a Windows service. Possible results: Stopped, StartPending, StopPending, Running, ContinuePending, PausePending, Paused. |
| Export-ServyServiceConfig | -Name (string, required)-ConfigFileType (string, required: xml, json)-Path (string, required) | Exports the configuration of a service to a file (XML or JSON). |
| Import-ServyServiceConfig | -ConfigFileType (string, required: xml, json)-Path (string, required) | Imports a service configuration from a file into Servy's database. |
| Show-ServyHelp | (no parameters) | Displays help information for all Servy CLI commands. |
| Show-ServyVersion | (no parameters) | Displays the current version of the Servy CLI module. |
Copyright © Akram El Assas. All rights reserved.
- Home
- Overview
- Installation Guide
- Advanced Configuration
- Usage
- Servy Desktop App
- Servy Manager
- Servy CLI
- PowerShell Module
- Examples & Recipes
- Logging & Log Rotation
- Health Monitoring & Recovery
- Environment Variables
- Service Dependencies
- Pre-Launch & Post-Launch Actions
- Pre-Stop & Post-Stop Actions
- Shutdown & Teardown
- Export/Import Services
- Automation & CI/CD
- Integration with Monitoring Tools
- Service Event Notifications
- Comparison with Alternatives
- Security
- Architecture
- Building from Source
- Troubleshooting
- FAQ