This document contains a complete description of Plesk for Windows command line utilities,
which includes detailed information on the utilities, commands and options, all accompanied
with real examples.
Who Should Read This Document
This document is intended for Plesk administrators who want to manage the Plesk server
and its configuration locally using command line utilities. The document can also be used by
third-party developers to integrate Plesk with other products installed on the same server.
6 Preface
Typographical Conventions
Formatting convention
Type of Information
Example
Special Bold
Items you must select, such as
menu options, command
buttons, or items in a list.
Go to the QoS tab.
Titles of chapters, sections, and
subsections.
Read the Basic Administration
chapter.
Italics
Used to emphasize the
importance of a point, to
introduce a term or to designate
a command line placeholder,
which is to be replaced with a
real name or value.
These are the so-called shared VPSs.
msiexec /i <name of the
aforementioned *.msi file or
GUID>
Monospace
The names of style sheet
selectors, files and directories,
and CSS fragments.
Install Plesk to the ”c:\plesk bin” directory.
Preformatted
On-screen computer output in
your command-line sessions;
logs; source code in XML, C++,
or other programming s.
05:31:49 Success. Admin
John Smith was added.
Preformatted Bold
What you type, contrasted with
on-screen computer output.
>cd %plesk_bin%
The following kinds of formatting in the text identify special information.
Feedback
If you have found a mistake in this guide, or if you have suggestions or ideas on how to
improve this guide, please send your feedback using the online form at
http://www.parallels.com/en/support/usersdoc/. Please include in your report the guide's title,
chapter and section titles, and the fragment of text in which you have found an error.
This chapter describes the version-specific changes in the CL utilities. The changes are
C H A P T E R 1
History of Changes in CL Utilities
grouped by new features in CLI. To describe a particular change in CLI, we use the
following notation:
(+) - the defined utility or command or option is added
(-) - the defined utility or command or option is deprecated
(*) - the defined utility or command or option is modified
Plesk 8.6
Added managing limit on maximum number of ODBC DSN connections.
It is possible now to choose which Webmail to use on a per-domain basis.
Managing ASP settings
The improved utility virtdir.exe allows managing the following ASP settings:
specifying the maximum size of ASP buffer and entity body of ASP requests, and
enabling/disabling ASP client-side and server-side script debugging.
Managing Firewall
The new utility firewall.exe allows managing Windows Firewall as follows:
enabling/disabling Windows Firewall and enabling default Firewall rules for a
network interface.
Calculating mailbox usage statistics
The improved utility statistics.exe allows calculating the amount of disk space
used by every mailbox on a specified or all domains.
Managing SSO service
The new utility sso.exe allows managing configuration of the single sign-on
authentication form as follows: enabling/disabling the SSO service on Plesk server,
configuring SSO service and getting SSO service configuration. The utility also
allows managing the SSO branding: set, get and remove branded URLs for
domains.
Plesk 8.2SQL queries execution
It is possible now to execute UPDATE and SELECT SQL queries against local or
remote Microsoft SQL, MySQL and Jet databases via CLI.
Restoring mail server configuration
The current reference now contains a completed description of the mchk.exe utility
which allows you to restore mail server configuration basing on the data stored in
Plesk database.
Calculating resources usage statistics
Improved statistics.exe allows calculating HTTP, FTP traffic and/or disk space
usage for selected domains, sending configurable email notifications on exceeding
limits, and launching "reached-limit" event actions.
Configuring Windows security settings of Plesk server, and Plesk hosted objects
Two brand new utilities ApplySecurity.exe and HostingSecurity.exe make
configuring Windows security of the entire Plesk server really easy.
History of Changes in CL Utilities 9
Plesk 8.1.x
Managing domain administrator accounts
Plesk 8.1 CLI provides a new utility domadmin.exe which serves to manage
domain administrators' accounts. This includes editing domain administrator's
personal information, viewing information about the domain, setting up the domain
management preferences (control panel access and interface features), and
domain administrator's permissions.
Managing additional FTP accounts
Along with the "main" FTP account created during the setup of physical hosting on
a domain, Plesk allows creating additional FTP accounts with adjustable access
rights to specific domain folders. Plesk 8.1 introduces the new utility
ftpsubaccount.exe which enables Plesk administrator to create and remove
additional FTP accounts on domains, change account login credentials, hard disk
quota, home directory, and user permissions.
Managing domain aliases
The new Plesk 8.1 utility domalias.exe allows creating or deleting domain
aliases, viewing information about domain aliases, enabling or disabling Web and
mail services on domain aliases.
Managing client and domain templates
Plesk client and templates are now managed via CLI, which means that you can
create/remove templates, and edit all the templates parameters: limits on resource
usage, permissions of a client and domain users, hosting parameters, and so on.
Managing desktop presets
The new Plesk task-oriented Desktop design allows Plesk users to access the
Plesk pages and functions they need much more quickly. Desktop preset is a
specific Desktop configuration used as default for a specific type of Plesk users.
Managing custom buttons
Custom buttons pointing to a URL, and custom buttons linked to site applications
can now be created, removed, and edited (interface location, button names, context
help messages, and other parameters).
Managing Database Servers
The database-server.exe and the database.exe utilities are updated to fully
support new Plesk for Windows feature Remote Database Servers, meaning that
now you can manage multiple database servers (local and remote) via CLI.
Server-wide configuration of mail server
Plesk 8.1.1 introduces new CL utility enabling Plesk administrators to set up serverwide configuration of mail service. Currently, only enabling/disabling check-up of
the mailbox passwords in the dictionary is available, but the functionality is going to
be extended.
10 History of Changes in CL Utilities
Plesk 7.6.x
Subscribing for mass mailing of SWsoft
In Plesk 7.6 for Windows and later, the administrator is allowed to subscribe for
mass mailing of SWsoft and to get announcements on new products, the
information about discounts, and other useful information.
ASP.NET version support on domains and subdomains
Plesk CLI now allows choosing a default version of Microsoft ASP.NET (1.1 and
2.0) for domains and subdomains with ASP.NET support.
Creating virtual subdomains
Along with physical subdomains (having their own folder structure not related to the
structure of a parent domain), Plesk now provides the opportunity to create virtual
subdomains that are physically hosted within the folder structure of the parent
domain. This approach allows direct access to resources (applications, etc.) of the
parent domain from within a virtual subdomain.
Creating virtual directories on the site
This is the newest feature supported in Plesk 7.6.1 for Windows. Now Plesk
supports virtual directories created on a site and mapping its physical folders.
Virtual directories are provided with flexible access settings, SSL support, ASP.NET
support and other useful features.
Providing support for multiple FrontPage users on a domain
For domains with FrontPage support, Plesk provides the opportunity to create
multiple additional FrontPage user accounts (extra FP accounts created in addition
to the one, FP WebAdmin). Once created, these accounts can be managed via the
administrator‟s FP account. Additional FrontPage accounts cannot be deleted by
FP WebAdmin.
Providing remote access to Plesk CP for a client via XML-based interface
Plesk can provide a client with an opportunity to create/manage/delete the client‟s
domains programmatically via a special RPC-XML based interface. This feature can
be useful for the clients selling domains via the Internet.
Extended management capabilities for Clients
The new version of Plesk for Windows provides some additional capabilities of
managing clients via CLI. Namely, now the administrator can use CLI to
allow/prohibit a client to access the client‟s Plesk via Control Panel, to manage the
client‟s IIS application pool, to set aliases for the client‟s domains, to manage the
client‟s hosting performance, and finally, to create and manage additional FTP
accounts (a new feature that allows the use of FTP accounts with access
permissions for the specified domain folders only) on the client‟s domains and
subdomains.
Managing SiteBuilder integration support on a Client and Domain
Plesk supports integration with SWsoft SiteBuilder. Thus, if any version of
SiteBuilder is integrated with Plesk and configured properly, creating a new client in
Plesk entails creating a SB user associated with this client, which is called
synchronization with SiteBuilder. Beginning with version 7.6, Plesk can integrate
SiteBuilder v.3.0 or later and the administrator can decide via CLI whether to put a
client in sync with SB or to disable SB support for this client.
History of Changes in CL Utilities 11
In case a given client supports SB (any version), then creating a new domain
owned by this client entails creating an empty site and publishing it on the domain.
Here Plesk allows the administrator to disable publishing, including via CLI.
Also, in case a given client supports SB v.3.0 or later, creating a new domain can
be accompanied with creating and publishing two related subdomains – blog and
photo. The administrator is allowed to enable/disable this option via CLI.
Managing spam filtering in SpamAssassin
Now Plesk allows the administrator to enable/disable spam filtering for the specified
email box by means of SpamAssassin via CLI.
Managing server-wide spam filtering in SpamAssassin
This is also the freshest feature supported in Plesk 7.6.1 for Windows and later.
Now Plesk allows the administrator to define spam filtering settings on the serverwide level. These settings can be forcedly applied to all mailboxes of the server
either instead of or along with personal spamcheck settings enabled for each
mailbox individually.
Plesk command line interface (CLI) is designed for integration of Plesk Server
CL Utility
Affected Object
anonftp.exe (on page 22)
anonymous FTP service
ApplySecurity.exe (on page
132)
security settings of server files and folders
client.exe (on page 25)
client accounts, client personal info, and several
account options
client_pref.exe (on page 29)
client limits, permissions, and interface settings
client_template.exe (on page
38)
client templates
custombutton.exe (on page
51)
custom buttons
database.exe (on page 60)
databases, database users
database-server.exe (on page
57)
database servers
desktop.exe (on page 63)
desktop presets
dbclient.exe(on page 152)
SQL queries
domadmin.exe (on page 76)
domain administrator accounts
domain.exe (on page 66)
domain accounts
domain_pref.exe (on page 86)
domain limits and preferences
domain_template.exe (on page
93)
domain templates
domalias.exe (on page 83)
domain aliases
C H A P T E R 2
Command Line Utilities Overview
Administrator with third-party applications. It can also be used for managing Plesk
instances by administrators experienced in using Plesk and Microsoft Windows
command line. This feature provides the command line interface to the majority of
management tasks that can be performed by Plesk administrator. The CLI provides the
alternative means of control for various business objects in Plesk. Plesk command line
utilities use the Plesk core functionality to create, manage, and delete clients, domains,
services and other Plesk objects.
At the moment, Plesk provides the following command line utilities (in alphabetical
order):
Command Line Utilities Overview 13
CL Utility
Affected Object
firewall.exe (on page 105)
firewall
fpseuser.exe (on page 16)
additional FrontPage user accounts
ftpsubaccount.exe (on page
19)
additional FTP accounts
HostingSecurity.exe (on page
106)
security settings of Plesk hosted objects (domain,
subdomain and web user folders and files)
init_conf.exe (on page 134)
initial server configuration, administrator personal
info
ipmanage.exe (on page 113)
IP addresses
keyupdate.exe (on page 115)
license keys
mail.exe (on page 116)
mail accounts
mailserver.exe (on page 125)
mail server configuration
maillist.exe (on page 126)
mailing lists
mchk.exe(on page 122)
mail server configuration
protdir.exe (on page 129)
web protection of domain directories
server_pref.exe (on page 49)
Plesk Control Panel appearance
sso.exe (on page 137)
single sign-on configuration
spamassassin.exe (on page
142)
spam filter parameters on the level of mail
account
spamassassin_server.exe (on
page 149)
server-wide spam filter parameters
statistics.exe(on page 145)
resources usage statistics
subdomain.exe (on page 154)
subdomains
virtdir.exe (on page 161)
virtual directories
webuser.exe (on page 168)
web user accounts
For general instructions on executing command line utilities on Plesk server, consult
the Getting Started with Command Line Utilities (on page 14) section.
Plesk for Windows CLU are located in the folder defined by the Windows environment
C H A P T E R 3
Getting Started With Command Line
Utilities
variable %plesk_bin%. By default, it is C:\Program
Files\Parallels\Plesk\admin\bin if Plesk was clean installed, and
C:\Program Files\SWsoft\Plesk\admin\bin if Plesk was updated from earlier
versions. If your Plesk is installed into different folder, all utilities are located at
%plesk_dir%\admin\bin.
To run command line utilities: 1 Log in to the Plesk server as Administrator or another user with
administrator's privileges.
2 Use one of the following options to run a utility:
To run a utility from any directory, use the following command line format:
On a domain with FrontPage support, Plesk allows creating multiple FrontPage users
in addition to FP WebAdmin created by default. The fpseuser.exe utility serves to
perform create, update and delete operations against these additional FP accounts on
the domain via CLI. The utility enables doing the following:
creating and deleting additional FP accounts
modifying access credentials for an additional FP account
setting and modifying hard disk quota for an additional FP account
displaying information about an existing additional FP account
Note: This utility and all its commands and options are available since Plesk 7.6.
Example
The following command creates an additional FTP account for the user JohnDoe on
the domain example.com, sets password userpass for the user, sets the hard disk
quota for the additional FTP account to 50 MB, specifies the /httpdocs/ directory as
the default home directory for the additional FTP account, and sets the Read permission for the user.
Example
The following command enables the anonymous FTP service on the domain
example.com, restricts the number of simultaneous FTP connections to 15, allows
creating subdirectories within the incoming directory, and restricts the download
bandwidth to 500 KB.
Enables/Disables the
anonymous FTP
service on the
specified domain.
To enable the anonymous FTP
service on example.com:
>anonftp.exe --update
example.com -status true
-message
true|false
Enables/Disables
displaying a login
message.
Is false by default.
To display the 'Welcome!' login
message when logging to the
anonymous FTP service on
example.com:
>anonftp.exe --update
example.com -status true
-message true -messagetext "Welcome!"
-message-text
<string>
Specifies a login
message text.
-incoming
true|false
Enables/Disables
upload to the
incoming directory.
Is false by default.
To enable uploading files to the
incoming directory:
>anonftp.exe --update
example.com -status true
-incoming true
-incoming-
dirs
true|false
Allows/Prohibit
creating directories in
the incoming
directory.
Is false by default.
To allow creating directories in
the incoming directory:
>anonftp.exe --update
example.com -status true
-incoming-dirs true
-incoming-
downloads
true|false
Enables/Disables
downloading from the
incoming directory.
Is false by default.
To allow downloading from the
incoming directory:
>anonftp.exe --update
example.com -status true
-incoming-downloads true
-incoming-
limit
<KB>
Restricts the disk
space used by the
incoming directory.
Unlimited if set to -1.
To restrict the disk space for the
incoming directory to 10 MB:
>anonftp.exe --update
example.com -status true
-incoming-limit 10240
-max-connects
<number>
Restricts the number
of available
simultaneous
connections.
Unlimited if set to -1.
To restrict the number of
simultaneous FTP connections
to 40:
>anonftp.exe --update
example.com -status true
-max-connects 40
Options
24 Using Command Line Utilities
Option
Parameter
Description
Example
-bandwidth
<KB>
Restricts the
download bandwidth.
Unlimited if set to -1.
Note: use this
option only if the
anonymous FTP
service on a
domain supports
download
restriction.
For example, the
MS FTP server
doesn't support this
feature.
To restrict the download
bandwidth to 1 MB:
>anonftp.exe --update
example.com -status true
-bandwidth 1024
Using Command Line Utilities 25
Client Accounts: client.exe
Command
Parameter
Description
Example
--create or -c
<login_name>
Creates a client
account.
Requires -name
and -passwd
options.
To create the account for John Doe with the login name JohnDoe
and password sample:
>client.exe --create
JohnDoe -name "John Doe"
-passwd "sample"
--update or -u
<login_name>
Updates a client
account.
To change the login name from
JohnDoe to John and set the
password to 12345:
>client.exe --update
JohnDoe -login John passwd 12345
The client.exe utility is designed for the purpose of managing Plesk client accounts.
The utility allows the following:
creating and removing client accounts
enabling/disabling existing client accounts
editing client's personal information
enabling/disabling dedicated IIS application pools for clients
setting a limit on client's CPU usage
enabling/disabling synchronization of client account with Sitebuilder user account
Example
The following command creates the client account for John Doe, sets JohnDoe as the
login name and MyPass as the password, specifies the Unites Statesas the client‟s
country, tells Plesk not to send to Plesk administrator a notification on the account
creation, enables the use of the dedicated IIS application pool for this client, and allows
the use of maximum 7% of CPU for the client‟s IIS application pool.
To retrieve the information about the
JohnDoe client account:
>client_pref.exe --info
JohnDoe
--help or -h
Outputs help on the
utility use.
>client_pref.exe –-help
Settings: client_pref.exe
The client_pref.exe utility serves to set and edit client limits and permissions, to
manage client IP address pool, and to define client-specific Plesk interface preferences
(i.e., the default language and skin).
Example
The following command updates the client account with the login name JohnDoe as
follows: the client is allowed managing log rotation and mailing lists, backing up and
restoring domains. Also, the client is allowed using Sitebuilder, the use of disk space
allotted for the client is restricted to 150 MB, the client is allowed creating up to 2
subdomains, and the expiration date of the client account is set to 2008-12-31.