-
-
Notifications
You must be signed in to change notification settings - Fork 42
Servy PowerShell Module
Akram El Assas edited this page Nov 18, 2025
·
22 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.
Once you install Servy, Servy PowerShell module is available at:
C:\Program Files\Servy\Servy.psm1
You can find detailed examples of how to use it here.
Important: If you face any issues with the PowerShell module in automated or non-interactive environments (e.g., CI/CD, Ansible, WinRM), use -Quiet option to suppress interactive output such as spinners or loading animations.
Import the module in your PowerShell session:
Import-Module "C:\Program Files\Servy\Servy.psm1" -ForceDisplay the version:
Show-ServyVersion -QuietDisplay help:
Show-ServyHelpInstall-ServyService `
-Quiet `
-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" `Export-ServyServiceConfig `
-Quiet `
-Name "WexflowServer" `
-ConfigFileType "xml" `
-Path "C:\WexflowServer.xml"
Export-ServyServiceConfig `
-Quiet `
-Name "WexflowServer" `
-ConfigFileType "json" `
-Path "C:\WexflowServer.json"Import-ServyServiceConfig `
-Quiet `
-ConfigFileType "xml" `
-Path "C:\WexflowServer.xml"
Import-ServyServiceConfig `
-Quiet `
-ConfigFileType "json" `
-Path "C:\WexflowServer.json"Start-ServyService -Quiet -Name "WexflowServer"
Get-ServyServiceStatus -Quiet -Name "WexflowServer"
Stop-ServyService -Quiet -Name "WexflowServer"
Restart-ServyService -Quiet -Name "WexflowServer"Uninstall-ServyService -Quiet -Name "WexflowServer"| Cmdlet | Parameters | Description |
|---|---|---|
Install-ServyService |
-Quiet (switch, optional)-Name (string, required)-DisplayName (string, optional)-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)-FailureProgramPath (string, optional)-FailureProgramStartupDir (string, optional)-FailureProgramParams (string, 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)-PostLaunchPath (string, optional)-PostLaunchStartupDir (string, optional)-PostLaunchParams (string, optional)-EnableDebugLogs (switch, optional) |
Installs a new Windows service with the specified parameters. |
Uninstall-ServyService |
-Quiet (switch, optional)-Name (string, required) |
Uninstalls a Windows service by name. |
Start-ServyService |
-Quiet (switch, optional)-Name (string, required) |
Starts a Windows service. |
Stop-ServyService |
-Quiet (switch, optional)-Name (string, required) |
Stops a Windows service. |
Restart-ServyService |
-Quiet (switch, optional)-Name (string, required) |
Restarts a Windows service. |
Get-ServyServiceStatus |
-Quiet (switch, optional)-Name (string, required) |
Gets the current status of a Windows service. Possible results: Stopped, StartPending, StopPending, Running, ContinuePending, PausePending, Paused. |
Export-ServyServiceConfig |
-Quiet (switch, optional)-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 |
-Quiet (switch, optional)-ConfigFileType (string, required: xml, json)-Path (string, required) |
Imports a service configuration from a file into Servy's database. |
Show-ServyHelp |
-Quiet (switch, optional) |
Displays help information for all Servy CLI commands. |
Show-ServyVersion |
-Quiet (switch, optional) |
Displays the current version of the Servy CLI module. |
Copyright © Akram El Assas. All rights reserved.
- Home
- Overview
- Installation Guide
- Usage
- Servy Manager
- Servy CLI
- Servy PowerShell Module
- Examples & Recipes
- Servy Automation & CI/CD
- Integration with Monitoring Tools
- Service Event Notifications
- Export/Import Services
- Pre‐Launch & Post‐Launch Actions
- Service Dependencies
- Monitoring & Health Checks
- Logging & Log Rotation
- Comparison with Alternatives
- Security
- Architecture
- Building from Source
- Troubleshooting
- FAQ