pohodactl.ps1
is a PowerShell script for automating STORMWARE POHODA accounting
software. You can use it to:
-
start, stop and get status of mServers
-
list connected users
-
run an automated task
Important
|
The script works with POHODA release 13900 and newer. Only POHODA SQL and POHODA E1 are supported. |
Download pohodactl.ps1
and pohodactl.conf
and keep them in the same directory. Modify the following options in
pohodactl.conf
according to your environment:
|
Path to |
|
SQL Server hostname. |
Backslashes must be escaped using another backslash (e.g. \\COMPUTER\Pohoda.exe
becomes \\\\COMPUTER\\Pohoda.exe
).
If you want to keep the configuration file in a different directory or under a different name, you need to provide its
path to pohodactl.ps1
as -Config
option.
pohodactl will use the credentials of the current user when authorizing to SQL Server.
PS> .\pohodactl.ps1 [COMMAND] [SUBCOMMAND] [ARGUMENT] [OPTIONS]
Command | Subcommand | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|
Prints a list of connected users. |
||||||||
|
|
Prints a list of configured mServers and their status. |
||||||||
|
Performs a health-check of configured mServers. pohodactl will send an authenticated HTTP request to the mServer to check if it’s responding. You can optionally pass a single mServer name as the argument, otherwise all mServers will be queried. Requires two additional configuration options to be present in
List connected users
PS> .\pohodactl.ps1 client list-active
Id PohodaUser LastActive Computer RemoteComputer WindowsUser Database
-- ---------- ---------- -------- -------------- ----------- --------
123 @ 01.01.2022 12:00:00 UCTOPC winusr StwPh_12345678_2022
124 @ 01.01.2022 12:00:00 WINSERVER SEF-PC sef StwPh_12345678_2022 Enumerate mServers
PS> .\pohodactl.ps1 mserver status
Year IsRunning Name Ico Url
---- --------- ---- --- ---
2022 True mserver 12345678 http://WINSERVER:8001 Health-check mServers
PS> .\pohodactl.ps1 mserver health
IsRunning Name IsResponding
--------- ---- ------------
True mserver True |