Top Banner
154

Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Mar 31, 2018

Download

Documents

volien
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description
Page 2: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

2

ISBN: N/A

SWsoft.

13755 Sunrise Valley Drive

Suite 325

Herndon

VA 20171 USA

Phone: +1 (703) 815 5670

Fax: +1 (703) 815 5675

© Copyright 1999-2007,

SWsoft Holdings, Ltd.

All rights reserved

Distribution of this work or derivative of this work in any form is prohibited unless prior written permission is obtained from the copyright holder.

Patented hosting technology protected by U.S.Patents 7,099,948; 7,076,633.

Patents pending in the U.S.

MS Windows, Windows 2003 Server, Windows XP, Windows 2000, Windows NT, Windows 98, and Windows 95 are registered trademarks of Microsoft Corporation.

Plesk for Windows Copyright Notice

Page 3: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

3

Contents

Plesk for Windows Copyright Notice 2

Preface 5

About This Guide ...................................................................................................................... 5 Typographical Conventions ....................................................................................................... 5 Feedback .................................................................................................................................. 6

What's New in Command Line Utilities 7

What‟s New in Plesk 7.6.x ......................................................................................................... 7 What‟s New in Plesk 8.1.x ......................................................................................................... 9 What's New in Plesk 8.2 .......................................................................................................... 10

Command Line Utilities Overview 11

Getting Started With Command Line Utilities 13

Using Command Line Utilities 14

Additional FrontPage Accounts: fpseuser.exe.......................................................................... 14 Additional FTP Accounts: ftpsubaccount.exe ........................................................................... 17 Anonymous FTP Service: anonftp.exe..................................................................................... 20 Client Accounts: client.exe ...................................................................................................... 22 Client Limits, Permissions, and Interface Settings: client_pref.exe ........................................... 25 Client Templates: client_template.exe ..................................................................................... 33 Control Panel Appearance: server_pref.exe ............................................................................ 43 Custom Buttons: custombutton.exe ......................................................................................... 44 Database Servers: database-server.exe .................................................................................. 51 Databases: database.exe ........................................................................................................ 54 Desktop Presets: desktop.exe ................................................................................................. 57 Domain Accounts: domain.exe ................................................................................................ 60 Domain Administrator Accounts: domadmin.exe ...................................................................... 70 Domain Aliases: domalias.exe................................................................................................. 77 Domain Limits and Preferences: domain_pref.exe ................................................................... 80 Domain Templates: domain_template.exe ............................................................................... 85 Hosted Objects Security: HostingSecurity.exe ......................................................................... 95 IP Addresses: ipmanage.exe ................................................................................................. 101 License Keys: keyupdate.exe ................................................................................................ 103 Mail Accounts: mail.exe......................................................................................................... 104 Mail Server Configuration Restore: mchk.exe ........................................................................ 110 Mail Server Options: mailserver.exe ...................................................................................... 113 Mailing Lists: maillist.exe ....................................................................................................... 114 Protection on Site Directories: protdir.exe .............................................................................. 117 Server Initial Configuration And Administrator's Personal Info: init_conf.exe .......................... 120 Server Security: ApplySecurity.exe........................................................................................ 123 Sitebuilder Integration: sitebuilder.exe ................................................................................... 125

Page 4: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Plesk for Windows Copyright Notice 4

Spam Filtering Configuration on the Mailbox Level: spamassassin.exe .................................. 127 Spam Filtering Configuration on the Server Level: spamassassin_server.exe ........................ 130 Statistics Calculation: statistics.exe ....................................................................................... 133 SQL Query Execution: dbclient.exe ....................................................................................... 137 Subdomains: subdomain.exe ................................................................................................ 139 Virtual Directories: virtdir.exe ................................................................................................. 146 Web Users: webuser.exe ...................................................................................................... 152

Page 5: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

5

About This Guide

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.

Typographical Conventions

The following kinds of formatting in the text identify special information.

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 into 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%

C H A P T E R 1

Preface

Page 6: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Preface 6

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 to [email protected]. 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.

Page 7: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

7

New CL utilities, commands, and options are added to new Plesk versions. This chapter describes the version-specific changes in the utilities.

In this chapter:

What‟s New in Plesk 7.6.x .............................................................................. 7 What‟s New in Plesk 8.1.x .............................................................................. 9 What's New in Plesk 8.2 ................................................................................ 10

What’s New in Plesk 7.6.x

Command line utilities in Plesk 7.6 and 7.6.1 introduce the following new features.

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 to choose 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, e.g., using URL like http://<subdomain_name>.

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.

C H A P T E R 2

What's New in Command Line Utilities

Page 8: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

What's New in Command Line Utilities 8

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.

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 server-wide 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.

Page 9: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

What's New in Command Line Utilities 9

What’s New in Plesk 8.1.x

Command line utilities in Plesk 8.1 for Windows introduce the following new utilities.

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 to create or delete domain aliases, view information about domain aliases, enable or disable 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.

Page 10: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

What's New in Command Line Utilities 10

Server-wide configuration of mail server

Plesk 8.1.1 introduces new CL utility enabling Plesk administrators to set up server-wide 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.

What's New in Plesk 8.2

Plesk 8.2 for Windows CLI Reference introduces the following new features.

SQL 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.

Page 11: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

11

Plesk command line interface (CLI) is designed for integration of Plesk Server 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):

CL Utility Affected Object

anonftp.exe (on page

20) anonymous FTP service

ApplySecurity.exe (on

page 123) security settings of server files and folders

client.exe (on page 22) client accounts, client personal info, and several account options

client_pref.exe (on

page 25) client limits, permissions, and interface settings

client_template.exe (on

page 33) client templates

custombutton.exe (on

page 44) custom buttons

database.exe (on page

54) databases, database users

database-server.exe (on

page 51) database servers

desktop.exe (on page

57) desktop presets

dbclient.exe (on page 137) SQL queries

domadmin.exe (on page

70) domain administrator accounts

domain.exe (on page 60) domain accounts

domain_pref.exe (on

page 80) domain limits and preferences

domain_template.exe (on

page 85) domain templates

C H A P T E R 3

Command Line Utilities Overview

Page 12: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Command Line Utilities Overview 12

CL Utility Affected Object

domalias.exe (on page

77) domain aliases

fpseuser.exe (on page

14) additional FrontPage user accounts

ftpsubaccount.exe (on

page 17) additional FTP accounts

HostingSecurity.exe (on

page 95) security settings of Plesk hosted objects (domain, subdomain and web user folders and files)

init_conf.exe (on page

120) initial server configuration, administrator personal info

ipmanage.exe (on page

101) IP addresses

keyupdate.exe (on page

103) license keys

mail.exe (on page 104) mail accounts

mailserver.exe (on page

113) mail server configuration

maillist.exe (on page

114) mailing lists

mchk.exe (on page 110) mail server configuration

protdir.exe (on page

117) web protection of domain directories

server_pref.exe (on

page 42) Plesk Control Panel appearance

spamassassin.exe (on

page 127) spam filter parameters on the level of mail account

spamassassin_server.exe

(on page 130) server-wide spam filter parameters

statistics.exe (on page

133) resources usage statistics

subdomain.exe (on page

139) subdomains

virtdir.exe (on page

146) virtual directories

webuser.exe (on page

152) web user accounts

For general instructions on executing command line utilities on Plesk server, consult the Getting Started with Command Line Utilities (on page 13) section.

Page 13: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

13

Plesk for Windows CLU are located in the folder defined by the Windows environment

variable %plesk_bin%. (By default, it is C:\Program

Files\SWsoft\Plesk\admin\bin.) 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:

To make %plesk_dir%admin\bin\ your current directory and run a utility from its home directory, run the following commands:

For exact command syntax of each utility, consult the corresponding sections in the Chapter "Using Command Line Utilities (on page 14)".

C H A P T E R 4

Getting Started With Command Line Utilities

>%plesk_bin%\<utility name> [parameters] [options]

>cd %plesk_bin%

><utility name> [parameters] [options]

Page 14: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

14

This chapter describes in detail the commands and options currently available in the Plesk for Windows command line interface. Each command and option is accompanied by a description and a usage example.

Additional FrontPage Accounts: fpseuser.exe

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/delete operations against these additional FP accounts on the domain via CLI. The utility enables you to do 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.

Syntax

fpseuser.exe <command> [<login_name>] [

<option1><param> [<option2><param>]…[<option N><param>]

]

Example

The following command line creates the FPuser1 FrontPage account with the 12345 password on domain1.com and restricts the use of disk space for it to 1 MB.

>fpseuser.exe --create FPuser1 -domain domain1.com – passwd 12345 -

quota 1

C H A P T E R 5

Using Command Line Utilities

Page 15: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 15

Commands

Command Parameter Description Example

--create

or -c <login_name

> Creates an additional FP account with the specified login on the specified domain. The

use of the -domain

option is required.

To create the FPuser1 account on

somewhere.com:

>fpseuser.exe --create

FPuser1 -domain

somewhere.com – passwd 12345

or

>fpseuser.exe -c FPuser1 -

domain somewhere.com –

passwd 12345

--update

or -u <login_name

> Updates the additional FP account with the

specified login name.

To change the hard disk quota for

FPuser2 to 1 MB:

>fpseuser.exe --update

FPuser2 –quota 1

or

>fpseuser.exe -u FPuser2 –

quota 1

--remove

or -r <login_name

> Removes the specified additional FP account

from the system.

To remove:

>fpseuser.exe --remove

FPuser1

or

>fpseuser.exe –r FPuser1

--info or

-i <login_name

> Retrieves the information about the

specified account.

To retrieve the info about FPuser2:

>fpseuser.exe --info FPuser2

or

>fpseuser.exe -i FPuser2

--help or

-h Displays help on the

use of the utility.

To see the help info on the use of this

utility:

>fpseuser.exe --help

or

>fpseuser.exe -h

Options

Option Parameter Description Example

-login <login_name> Sets the new login for a specified additional FP

account.

To set the newFPuser1 login for the FPuser1:

>fpseuser.exe --update

FPuser1 -login newFPuser1

-passwd <passwd> Sets the password for the specified additional FP account. Is required when creating an additional FP

account.

To set the qqdq password for FPuser1:

>fpseuser.exe --update

FPuser1 -passwd qqdq

Page 16: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 16

Option Parameter Description Example

-domain <domain_name

> Specifies the domain a newly created additional FP account will belong to. Is required when creating an additional FP account. Is not required for other operations as the additional FP account has a unique name in the system.

To create an additional FP account on somewhere.com:

>fpseuser.exe --create

FPuser3 -domain

somewhere.com –passwd 12345

-quota <MB> Restricts the hard disk space allotted for the specified FP user account (in MB). If set to 0, means the unlimited

disk space.

To restrict the use of disk space for FPuser2 to 1 MB:

>fpseuser.exe --update

FPuser2 -domain - quota 1

Page 17: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 17

Additional FTP Accounts: ftpsubaccount.exe

The ftpsubaccount.exe utility is designed to manage additional FTP accounts. The utility allows the following operations:

creating / deleting additional FTP accounts on domains

changing additional FTP account login credentials, hard disk quota, home directory, and user permissions

Note: This utility and all its commands and options are available only for Plesk 8.1 and later.

Syntax

ftpsubaccount.exe <command> [

<option1> <param> [<option2> <param>]…[<option N> <param>]

]

Example

The following command line creates an additional FTP account for the user accountuser on 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.

>ftpsubaccount.exe --create accountuser -domain example.com -passwd

userpass -quota 50 -access_read true

Commands

Command Parameter Description Example

--create

or -c *

<login_na

me>

Creates additional FTP

account

Requires the use of the -domain

and -passwd

options.

To create an additional FTP account with login name accountuser and password

userpass on domain example.com:

>ftpsubaccount.exe --create

accountuser -passwd userpass -

domain example.com

Page 18: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 18

Command Parameter Description Example

--update

or -u

<login_na

me>

Updates configuration of the existing additional FTP account with data specified in the

options.

To change a password to newpassword for additional FTP account for user with login

name accountuser:

>ftpsubaccount.exe --update

accountuser -passwd newpassword

or

>ftpsubaccount.exe -u accountuser

-passwd newpassword

--remove

or -r

<login_na

me>

Deletes an additional FTP account for the user with the specified login

name

To delete the additional FTP account for user with login name accountuser:

>ftpsubaccount.exe --remove

accountuser

or

>ftpsubaccount.exe -r accountuser

--info or

-i

<login_na

me> Displays information about the specified additional FTP

account.

To view information about the additional FTP account for user with login name

accountuser:

>ftpsubaccount.exe --info

accountuser

or

>ftpsubaccount.exe -i accountuser

--help or

–h

Displays help on the use of the

utility

To view help on the use of this utility:

>ftpsubaccount.exe --help

or

>ftpsubaccount.exe -h

Options

Option Parameter Description Example

-login <login_nam

e>

Sets the login name for the user of the additional FTP account (the FTP account name

parameter)

To change the login name for the additional FTP account user accountuser

to newuser:

>ftpsubaccount.exe -u

accountuser -login newuser

-passwd <passwd> Sets the password for additional FTP

account password

To change the password for the additional FTP account user accountuser to

newpassword:

>ftpsubaccount.exe -u

accountuser -passwd newpassword

Page 19: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 19

Option Parameter Description Example

-domain

*

<domain_na

me>

Specifies the domain on which the additional FTP account is to be

created.

Required with --

create.

To create a additional FTP account with login name accountuser and password

userpass on domain example.com:

>ftpsubaccount.exe --create

accountuser -passwd userpass -

domain example.com

-quota <number> Sets the Hard disk quota parameter for an additional FTP

account.

To set the hard disk quota for additional FTP account user accountuser to 50 MB:

>ftpsubaccount.exe -u

accountuser -quota 50

To set the hard disk quota for additional FTP account user accountuser to

Unlimited:

>ftpsubaccount.exe -u

accountuser -quota 0

or

>ftpsubaccount.exe -u

accountuser -quota -1

(both 0 and a negative number are interpreted as unlimited)

-home <home_path

> Sets the path to the home directory (Home directory) for an additional FTP account. Sets

/httpdocs by

default.

To set the home directory for additional FTP account user accountuser to an

existing directory /httpdocs:

>ftpsubaccount.exe -u

accountuser -home /httpdocs

The path is defined relative to the domain home directory path. The specified

directory must exist.

-

access_

read

true|false Sets the Read permission

parameter. False by

default.

To set the Read permission for additional FTP account user accountuser:

>ftpsubaccount.exe -u

accountuser -access_read true

-

access_

write

true|false Sets the Write permission

parameter. False by

default.

To set the Write permission for the additional FTP account user accountuser:

>ftpsubaccount.exe -u

accountuser -access_read true

Page 20: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 20

Anonymous FTP Service: anonftp.exe

The anonftp.exe utility serves to manage the anonymous FTP service. The utility allows the following operations:

enabling/disabling anonymous FTP access

restricting the download bandwidth and the maximum number of simultaneous connections

managing incoming directory parameters and login message options

Syntax

anonftp.exe <command> [<domain_name>] [

<option1><param> [<option2><param>]…[<option N><param>]

]

Example

The following command line enables the anonymous FTP service on the

domain1.com domain, restricts the number of simultaneous FTP connections to 15, allows creating subdirectories within the incoming directory, and restricts the download bandwidth to 100 KB.

>anonftp.exe --update domain1.com -status true -max_connects 15 -

incoming true -bandwidth 100

Commands

Command Parameter Description Example

--update

or -u <domain_

name> Updates the anonymous FTP settings for the

specified domain.

To update somewhere.com by enabling the anonymous FTP service on it:

>anonftp.exe --update

somewhere.com -status true

or

>anonftp.exe -u somewhere.com -

status true

--info

or -i <domain_

name> Retrieves the information about anonymous FTP settings set for the

specified domain.

To get the info on anonymous FTP settings on somewhere.com:

>anonftp.exe --info somewhere.com

or

>anonftp.exe -i somewhere.com

--help

or -h Displays help on

the use of the

utility.

To see the help info on the use of this utility:

>anonftp.exe -–help

or

>anonftp.exe –h

Page 21: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 21

Options

Option Parameter Description Example

-status true|fal

se Enables/disables the anonymous FTP service on the specified domain.

To enable the anonymous FTP service

on somewhere.com:

>anonftp.exe --update

somewhere.com -status true

-message true|fal

se Displays the login message.

To display the 'Welcome!' login message when logging to the anonymous FTP

service on somewhere.com:

>anonftp.exe --update -status

true -message true -message-

text “Welcome!”

-message-text <string> Specifies the login

message text.

-incoming true|fal

se Enables/disables upload to the incoming directory. Is set to false by

default.

To enable upload to the incoming directory:

>anonftp.exe --update

somewhere.com -status true -

incoming true

-incoming-

dirs true|fal

se Allows creating directories in the incoming directory.

To allow creating directories in the

incoming directory:

>anonftp.exe --update

somewhere.com -status true -

incoming-dirs true

-incoming-

downloads true|fal

se Enables/disables downloading from the incoming

directory.

To allow download from the incoming

directory:

>anonftp.exe --update

somewhere.com -status true -

incoming-downloads true

-incoming-

limit <KB> Restricts the disk

space used by the incoming directory. If set to -1, the disk space is

unlimited.

To restrict the disk space for the

incoming directory to 900 KB:

>anonftp.exe --update

somewhere.com -status true -

incoming-limit 900

-max-connects <number> Restricts the number of simultaneous connections. If set to -1, the value is

unlimited.

To restrict the number of simultaneous FTP connections to 4:

>anonftp.exe --update

somewhere.com -status true -

max-connects 4

-bandwidth <KB> Restricts the download bandwidth. If set to -1, the value is

unlimited.

To restrict the download bandwidth to 50 KB:

>anonftp.exe --update

somewhere.com -status true -

bandwidth 50

Page 22: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 22

Client Accounts: client.exe

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

Syntax

client.exe <command> [<login_name>] [

<option1> <param> [<option2> <param>] … [<option N> <param>]

]

Example

The following command creates client account for John Doe, sets johndoe as the login name and MyPass as the password, specifies the Unites States as 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.

>client.exe --create johndoe -name "John Doe" -passwd MyPass -notify

false -iis_app_pool true -cpu_usage 7

Commands

Command Parameter Description Example

--create or -c <login_name> creates client account

To create an account for John Doe with login name johndoe and

password sample:

>client.exe --create

johndoe -name "John Doe"

-passwd "sample"

--update or -u <login_name> updates client account

To change John Doe's login to johnny and password to 12345:

>client.exe --update

johndoe -login "johnny" -

passwd 12345

--remove or -r <login_name> removes client account

To remove John Doe's account:

>client.exe --remove

johndoe

Page 23: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 23

Command Parameter Description Example

--info or -i <login_name> outputs client info To retrieve the info on the johndoe account:

>client.exe --info

johndoe

--on <login_name> enables client

account

To enable the johndoe account:

>client.exe --on johndoe

--off <login_name> disables client account

To disable the johndoe account:

>client.exe --off johndoe

--help or -h

displays help on the utility use

>client.exe --help

Options

Option Parameter Description Example

-status true|fal

se enables/disables a client

account (true by default)

used with --update

duplicates --on and --off

commands to make the utility compatible with further

versions of Plesk

To disable John Doe's account:

>client.exe --update

johndoe -status false

-company string specifies the name of client's company

used with --update

To update John Doe's info with company name:

>client.exe --update

johndoe -company

"MegaCompany Inc."

-name string specifies the client's contact name

required by --create

see the Example above

-login <login_n

ame> specifies the client's login name used to entering Plesk

control panel.

used with --update only

To change John Doe's login to johnny:

>client.exe --update

johndoe -login "johnny"

-passwd <passwd> sets client password used to

entering Plesk control panel

required with --create

To create the johndoe account for John Doe with the Sample password:

>client.exe --create

johndoe -name "John Doe" -

passwd Sample

-phone <number> sets client's phone number To change the phone number in the

personal info of the johndoe account:

>client.exe --update

johndoe -phone 5552345678

Page 24: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 24

Option Parameter Description Example

-fax <number> sets client's fax number To change the fax number in the personal info of the johndoe account:

>client.exe --update

johndoe -fax 5556676677

-email <string> sets client's email address To change the email address in the

personal info of the johndoe account:

>client.exe --update

johndoe -email [email protected]

-addr <string> sets client‟s postal address To change the postal address in the personal info of the johndoe account:

>client.exe --update

johndoe -addr "Elm str. 17"

-city <string> sets client's city To change the city in the personal

info of the johndoe account:

>client.exe --update

johndoe -city "New York"

-state <string> sets client's state/province To change the state in the personal info of the johndoe account:

>client.exe --update

johndoe -state NY

-pcode <string> sets client's zip/postal code To change the zip code in the personal info of the johndoe account:

>client.exe --update

johndoe -pcode 77381

-country <string> sets client's country: a two-letters upper-case code in

compliance with ISO 3166

To change the country in the personal info of the johndoe account:

>client.exe --update

johndoe -country US

-notify true|fal

se enables/disables sending a notification on the client

account creation

used with --create only

see the Example above

-

iis_app_

pool

true|fal

se specifies whether the dedicated IIS application pool

is provided for the client

false by default

To grant dedicated IIS application

pool to the johndoe account:

>client.exe --update

johndoe -iis_app_pool true

-

cpu_usag

e

<number> sets the maximum percent of CPU usage for the client's IIS

application pool.

used only if the client is provided with dedicated IIS

application pool

unlimited if set to -1

To restrict the CPU usage for the dedicated IIS application pool of the

johndoe account to 5%:

>client.exe --update

johndoe -iis_app_pool true

-cpu_usage 5

Page 25: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 25

Option Parameter Description Example

-sb_sync true|fal

se enables/disables synchronization with SiteBuilder 3.x when creating

a new client

set to true by default

used with --create only

available in Plesk 7.6 and

later

To create an account not synchronized with SiteBuilder 3.x:

>client.exe --create

johndoe -name "John Doe" -

passwd MyPass -sb_sync

false

Client Limits, Permissions, and Interface Settings: client_pref.exe

The client_pref.exe utility serves to set and edit client limits and permissions, to manage client IP pool, and to define client-specific Plesk interface preferences (i.e., the default language and skin).

Syntax

client_pref.exe <command> [<login_name>] [

<option1> <param1> [<param2>…<param n>]

[<option2> <param1> [<param2>…<param n>]]

…[<optionN> <param1> [<param2>…<param n>]]

]

Example

The following command updates the johndoe client account as follows: the client is allowed to manage log rotation and mailing lists, to use backup/restore utilities. Also, the client is allowed to use SiteBuilder, the use of disk space allotted for the client is restricted to 150 Mbytes, the client is allowed to create up to 2 subdomains, and the expiration date of the client account is set to 2008-12-31.

>client_pref.exe --update johndoe -manage_log true -manage_maillists

true -make_dumps true -site_builder true -disk_space 150 -max_subdom 2

-expiration 2008-12-31

Page 26: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 26

Commands

Command Parameter Description Example

--update or -u <login_name> Sets various properties of client

account.

To prohibit changing domain limits

to the johndoe account:

>client_pref.exe --update

johndoe -change_limits

false

--skin-list

or -sl

Outputs a list of

available skins.

>client_pref.exe --skin-

list

--info or -i <login_name> Outputs client account

information.

To retrieve the client info about the

johndoe account:

>client_pref.exe --info

johndoe

--help or -h Outputs help on the utility use.

>client_pref.exe –-help

Options

Option Parameter Description Example

-

create_d

omains

true |

false Allows creating domains. To allow creating domains to John

Doe:

>client_pref.exe --update

johndoe -create_domains

true

-

manage_p

hosting

true |

false Allows managing physical hosting.

To allow managing physical hosting to John Doe:

>client_pref.exe --update

johndoe -manage_phosting

true

-

change_l

imits

true |

false Allows changing limits on usage of domain resources.

To prohibit the johndoe account from changing domain limits:

>client_pref.exe --update

johndoe -change_limits

false

-

manage_d

ns

true |

false Allows managing DNS zones. To provide the johndoe account

with an option of managing DNS:

>client_pref.exe --update

johndoe -manage_dns true

-

manage_l

og

true |

false Allows managing log rotation. To prohibit the johndoe account

from an option of managing log

rotation:

>client_pref.exe --update

johndoe -manage_log false

Page 27: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 27

Option Parameter Description Example

-

manage_c

rontab

true |

false Allows managing task scheduler.

To provide the johndoe account with an option of managing task

scheduler:

>client_pref.exe --update

johndoe -manage_crontab

true

-

manage_a

nonftp

true |

false Allows managing Anonymous FTP.

To provide the johndoe account with an option of managing

Anonymous FTP:

>client_pref.exe --update

johndoe -manage_anonftp

true

-

manage_w

ebapps

true |

false Allows managing Tomcat web applications.

To prohibit the johndoe account from managing Tomcat web

applications:

>client_pref.exe --update

johndoe -manage_webapps

false

-

manage_m

aillists

true |

false Allows managing mailing lists. To provide the johndoe account

with an option of managing mailing

lists:

>client_pref.exe --update

johndoe -manage_maillists

true

-

manage_s

h_access

true |

false Allows the client to manage system access.

To prohibit the johndoe account from managing access to the

system:

>client_pref.exe --update

johndoe -manage_sh_access

false

-

manage_s

ubdomain

s

true |

false Allows managing subdomains. To provide the johndoe account

with an option of managing

subdomains:

>client_pref.exe --update

johndoe -manage_subdomains

true

-

manage_q

uota

true |

false Allows changing limit on using disk space.

To allow the johndoe account to change the hard disk quota:

>client_pref.exe --update

johndoe -manage_quota true

-

make_dum

ps

true |

false Allows back up/restore

domains.

To allow the johndoe account to

use backup/restore utilities:

>client_pref.exe --update

johndoe -make_dumps true

-

manage_d

rweb

true |

false Allows managing DrWeb antivirus.

To provide the johndoe account with an option of managing DrWeb:

>client_pref.exe --update

johndoe -manage_drweb true

Page 28: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 28

Option Parameter Description Example

-

remote_a

ccess_in

terface

true |

false Allows using the XML based remote access interface.

Available since Plesk 7.6.

To allow the johndoe client to use XML remote access interface:

>client_pref.exe --update

johndoe -

remote_access_interface

true

-

site_bui

lder

true |

false Allows using SiteBuilder. To provide the johndoe account

with an option of using SiteBuilder:

>client_pref.exe --update

johndoe -site_builder true

-max_dom <number

> Limits the number of domains a client can obtain.

If set to -1, means unlimited.

To restrict the maximal number of domains available for the johndoe

account to 3:

>client_pref.exe --update

johndoe -max_dom 3

-

max_dom_

aliases

<number

> Limits the number of domain aliases a client can create.

If set to -1, means unlimited.

To restrict the maximal number of domain aliases available for the

johndoe account to 2:

>client_pref.exe --update

-max_dom_aliases 2

-

disk_spa

ce

<number

> Limits the amount of available

disk space (in Mbytes).

If set to -1, means unlimited.

To restrict the maximal disk space

for the johndoe account to 100 MB :

>client_pref.exe --update

johndoe -disk_space 100

-

max_traf

fic

<number

> Limits monthly traffic usage (in Mbytes).

If set to -1, means unlimited.

To restrict the traffic for the johndoe account to 100 MB:

>client_pref.exe --update

johndoe -max_traffic 100

-max_box <number

> Limits the allowed number of

mailboxes.

if set to -1, means unlimited.

To restrict the maximal number of mailboxes for the johndoe account

to 10 :

>client_pref.exe --update

johndoe -max_box 10

-

mbox_quo

ta

<number

> Limits the amount of disk space that a single mailbox can

occupy (in kbytes).

To restrict the maximal mailbox size for the johndoe account to 700 KB:

>client_pref.exe --update

johndoe -mbox_quota 700

Page 29: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 29

Option Parameter Description Example

-

total_mb

oxes_quo

ta

<number

> Limits the amount of disk space that all client‟s mailboxes can

occupy (in Mbytes).

If set to -1, means unlimited.

Not available if the mail server software used with Plesk does not support handling cumulative

mailbox quota.

To restrict the maximal total size of all mailboxes for the johndoe

account to 20 MB:

>client_pref.exe --update

johndoe -

total_mboxes_quota 20

-

max_redi

r

<number

> Limits the number of mail redirects available to the client.

If set to -1, means unlimited.

To restrict the maximal number of redirects for the johndoe account to

3:

>client_pref.exe --update

johndoe -max_redir 3

-max_mg <number

> Limits the number of mail

groups available to the client.

If set to -1, means unlimited.

To limit the maximal number of email groups for the johndoe

account to 5 :

>client_pref.exe --update

johndoe -max_mg 5

-

max_resp <number

> Limits the number of mail autoresponders available to the

client.

If set to -1, means unlimited.

To limit the maximal number of email autoresponders for the

johndoe account to 5 :

>client_pref.exe --update

johndoe -max_resp 5

-max_wu <number

> Limits the number of web users that can be created on client's

domains.

If set to -1, means unlimited.

To limit the maximal quantity of web users for the johndoe account to 2:

>client_pref.exe --update

johndoe -max_wu 2

-

max_mail

lists

<number

> Limits the number of mailing lists available to a client.

If set to -1, means unlimited.

To limit the maximal number of mailing lists for the johndoe account

to 3 :

>client_pref.exe --update

johndoe -max_maillists 3

-

max_fpse

_users

<number

>

Limits the number of additional Microsoft FrontPage accounts that can be created on client's domains.

If set to -1, means unlimited.

To set the Maximum number of additional Microsoft FrontPage accounts limit for the johndoe account to Unlimited:

>client_pref.exe -u

johndoe -max_fpse_users -1

-

max_subf

tp_users

<number

>

Limits the number of additional FTP accounts that can be

created on client's domains.

If set to -1, means unlimited.

To set the Maximum number of additional FTP accounts limit for the

johndoe account to 100:

>client_pref.exe -u

johndoe -max_subftp_users

100

Page 30: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 30

Option Parameter Description Example

-max_db <number

> Limits the number of MySQL databases that can be created

on client's domains.

If set to -1, means unlimited.

To limit the maximal number of databases for the user of the

johndoe account to 2 :

>client_pref.exe -u

johndoe -max_db 2

-

max_mssq

l_db

<number

> Limits the number of Microsoft SQL databases that can be

created on client's domains.

If set to -1, means unlimited.

To limit the number of MS SQL databases for the johndoe account

to 5:

>client_pref.exe --update

-max_mssql_db 5

-

mysql_db

ase_spac

e

<number

> Limits disk space (in Mbytes) that can be occupied by all MySQL databases on client's

domains.

If set to -1, means unlimited.

To restrict the disk space for all MySQL databases of the johndoe

account to 200 Mbytes:

>client_pref.exe --update

-mysql_dbase_space 200

-

mssql_db

ase_spac

e

<number

> Limits disk space (in Mbytes) that can be occupied by all Microsoft SQL databases on

client's domains.

If set to -1, means unlimited.

To restrict the disk space allotted for all Microsoft SQL databases of the johndoe account to 300

Mbytes:

>client_pref.exe --update

-mssql_dbase_space 300

-

max_weba

pps

<number

> Limits the number of Tomcat web applications available to a

client.

If set to -1, means unlimited.

To restrict the maximal number of Tomcat web applications allowed

for the johndoe account to 5:

>client_pref.exe --update

johndoe -max_webapps 5

-

max_subd

om

<number

> Limits the number of subdomains that can be created

on client's domains.

If set to -1, means "unlimited".

To restrict the maximal number of subdomains for the johndoe

account to 4:

>client_pref.exe -u

johndoe -max_subdom 4

-

max_iis_

app_pool

s

<number

> Limits the number of IIS application pools available to a

client.

If set to -1, means unlimited.

To restrict the maximal number of IIS application pools for the johndoe

account to 6:

>client_pref.exe -u

johndoe -max_iis_app_pools

6

-

max_shar

ed_ssl_l

inks

<number

> Limits the number of shared

SSL links available to a client.

If set to -1, means unlimited.

To restrict the maximal number of shared SSL links for the johndoe

account to 3:

>client_pref.exe -u

johndoe -

max_shared_ssl_links 3

-

expirati

on

<date> Limits the validity period of a

client‟s account.

In a format YYYY-MM-DD.

To make the johndoe account valid

till 31 December 2008:

>client_pref.exe -u

johndoe -expiration 2008-

12-31

Page 31: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 31

Option Parameter Description Example

-ip_pool add|del

:<ip1>,

<ip2>,

..,

<ipN>

Adds/Deletes IP addresses to/from client‟s IP pool.

To add IP address 192.0.2.127 to John Doe‟s IP pool:

>client_pref.exe -u

johndoe -ip_pool add:

192.0.2.127

-

language <string

> Specifies which language is used in a client's control panel interface.

String should contain the first two letters of the language

name.

To set Italian language as default

for the johndoe account:

>client_pref.exe -u

johndoe -language it

-skin <string

> Specifies which skin is used for a client's control panel

interface.

To set the WinXP Reloaded skin for

the johndoe account user:

>client_pref.exe --update

johndoe -skin "WinXP

Reloaded"

-

cp_acces

s

true |

false Allows access to the client‟s

Plesk via Plesk Control Panel.

Available since Plesk 7.6.

To allow access to Plesk CP for the

johndoe client:

>client_pref.exe --update

johndoe - cp_access true

-

manage_s

ubftp

true |

false Allows managing additional FTP accounts created on

client's domains.

Available since Plesk 7.6.

To allow the johndoe client to manage additional FTP accounts:

>client_pref.exe --update

johndoe - manage_subftp

true

-

manage_d

omain_al

iases

true |

false Allows managing domain aliases.

Available since Plesk 7.6.

To allow the johndoe client to manage the client‟s domain aliases:

>client_pref.exe --update

johndoe -

manage_domain_aliases true

-

manage_p

erforman

ce

true |

false Allows managing hosting performance.

Available since Plesk 7.6.

To allow the johndoe client to manage hosting performance

settings :

>client_pref.exe --update

johndoe -

manage_performance true

-

manage_i

is_app_p

ool

true |

false Allows managing IIS application pool.

Available since Plesk 7.6.

To allow the johndoe client to manage IIS application pool:

>client_pref.exe --update

johndoe -

manage_iis_app_pool true

-

manage_w

ebstat

true |

false

Allows managing Web Statistics on the client's domains, namely, to choose which of the web

statistics tools (or none) to use.

If not defined, means false.

Available since Plesk 8.1.1.

To allow the johndoe client to manage web statistics on his

domains:

>client_pref.exe --update

johndoe -manage_webstat

true

Page 32: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 32

Option Parameter Description Example

-

manage_a

dditiona

l_permis

sions

true |

false

Allows enabling and disabling the Additional write/modify permissions option of domain

hosting, which, if enabled, means granting to the Plesk IIS User the Full access permission

for the domain httpdocs/ and

httpsdocs/ files and

subfolders (may be required for web applications correct

functioning, but is insecure).

Set to false by default.

Available since Plesk 8.1.1.

To allow the johndoe client to manage Additional write/modify

permissions option on his domains:

>client_pref.exe --update

johndoe -

manage_additional_permissi

ons true

-

manage_s

pamfilte

r

true |

false Allows configuring Spam Filtering on the mail account level (if the correspondent option is enabled in the server-

wide configuration).

Available since Plesk 8.1.1.

To allow the johndoe client to configure Spam Filtering on his

domains:

>client_pref.exe --update

johndoe -

manage_spamfilter true

-

manage_s

hared_ss

l

true |

false

Allows/prohibits a client to manage the Shared SSL feature: to make up one of the client's domains a Master SSL Domain which shares its SSL certificates with other domains, and to create shared SSL links

to Master for his other domains.

Available since Plesk 8.2.

To allow the johndoe client to manage shared SSL on his

domains:

>client_pref.exe --update

johndoe -

manage_shared_ssl true

Page 33: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 33

Client Templates: client_template.exe

The client_template.exe utility serves to set and edit client template limits, permissions, and preferences.

Note: This utility is available since Plesk 8.1.

Syntax

client_template.exe <command> <client template name> [

<option1><param1>[<param2>…<param n>]

[<option2><param1>[<param2>…<param n>]]

…[<option N><param1>[<param2>…<param n>]]

]

Example

The following command changes the name of existing client template ClientTemplate to the new name ClientTemplateGoldPlan, enables hard disc quota management by client, enables domain creation by client, sets the Disc space limit to Unlimited, enables allocation of up to 12 exclusive IP addresses to client account, and set the validity period for client account to 1 year from the creation date.

>client_template.exe --update ClientTemplate -new-name

ClientTemplateGoldPlan -manage_quota true -create_domains true -

disk_space -1 -excl_ip_num 12 -expiration 1Y

Commands

Command Parameter Description Example

--create

or -c

<template_

name> Creates a new client template.

To create a client template named ClientTemplate:

>client_template.exe --create

ClientTemplate

or

>client_template.exe -c

ClientTemplate

--update

or -u

<template_

name>

Updates an existing client

template.

To update a client template named ClientTemplate:

>client_template.exe --update

ClientTemplate

or

>client_template.exe -u

ClientTemplate

--remove

or -r

<template_

name>

Deletes a client template.

To remove a client template ClientTemplate:

>client_template.exe --remove

ClientTemplate

or

>client_template.exe -r

ClientTemplate

Page 34: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 34

Command Parameter Description Example

--info or

-i

<template_

name>

Displays information about a client

template

To display information about client template ClientTemplate:

>client_template.exe --info

ClientTemplate

or

>client_template.exe -i

ClientTemplate

--help or

-h

Displays help on the use of the

utility

To view help on the use of the utility:

>client_template.exe --help

or

>client_template.exe -h

Options

Option Parameter Description Example

-new-name <string> Sets a new name for an existing client

template.

To change the name of client template ClientTemplate to NewClientTemplate:

>client_template.exe --update

ClientTemplate -new-name

NewClientTemplate

or

>client_template.exe -u

ClientTemplate -new-name

NewClientTemplate

-cp_access true|fals

e

Sets the Access to control panel

parameter.

To select the Access to control panel option in client template ClientTemplate:

>client_template.exe -u

ClientTemplate -cp true

-

create_doma

ins

true|fals

e

Sets the Domain creation parameter.

To select the Domain creation option in client template ClientTemplate:

>client_template.exe -u

ClientTemplate -create_domains

true

-

manage_phos

ting

true|fals

e

Sets the Physical hosting management

parameter.

To select the Physical hosting management option in client template

ClientTemplate:

>client_template.exe -u

ClientTemplate -

manage_phosting true

-

manage_sh_a

ccess

true|fals

e

Sets the System access management (shell access to a client account for the

client) parameter.

To select the System access management option in client template

ClientTemplate:

>client_template.exe -u

ClientTemplate -

manage_sh_access true

Page 35: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 35

Option Parameter Description Example

-

manage_quot

a

true|fals

e

Sets the Hard disk quota assignment

parameter.

To select the Hard disk quota assignment option in client template

ClientTemplate:

>client_template.exe -u

ClientTemplate -manage_quota

true

-

manage_subd

omains

true|fals

e

Sets the Subdomains management

parameter.

To select the Subdomain management option in client template ClientTemplate:

>client_template.exe -u

ClientTemplate -

manage_subdomains true

-

manage_doma

in_aliases

true|fals

e

Sets the Domain Aliases management

parameter.

To select the Domain Aliases management option in client template

ClientTemplate:

>client_template.exe -u

ClientTemplate -

manage_domain_aliases true

-manage_log true|fals

e

Sets the Log rotation management

parameter.

To select the Log rotation management option in client template ClientTemplate:

>client_template.exe -u

ClientTemplate -manage_log

true

-

manage_anon

ftp

true|fals

e

Sets the Anonymous FTP management

parameter.

To select the Anonymous FTP management option in client template

ClientTemplate:

>client_template.exe -u

ClientTemplate -manage_anonftp

true

-

manage_subf

tp

true|fals

e

Sets the FTP account management

parameter.

To select the FTP account management option in client template ClientTemplate:

>client_template.exe -u

ClientTemplate -manage_subftp

true

-

manage_cron

tab

true|fals

e

Sets the Scheduler management

parameter.

To select the Scheduler management option in client template ClientTemplate:

>client_template.exe -u

ClientTemplate -manage_crontab

true

-

change_limi

ts

true|fals

e

Sets the Domain limits adjustment

parameter.

To select the Domain limits adjustment option in client template ClientTemplate:

>client_template.exe -u

ClientTemplate -change_limits

true

-manage_dns true|fals

e

Sets the DNS zone management

parameter.

To select the DNS zone management option in client template ClientTemplate:

>client_template.exe -u

ClientTemplate -manage_dns

true

Page 36: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 36

Option Parameter Description Example

-

manage_weba

pps

true|fals

e

Sets the Tomcat applications management

parameter.

To select the Tomcat applications management option in client template

ClientTemplate:

>client_template.exe -u

ClientTemplate -manage_webapps

true

-

manage_mail

lists

true|fals

e

Sets the Mailing lists management

parameter.

To select the Mailing lists management option in client template ClientTemplate:

>client_template.exe -u

ClientTemplate -

manage_maillists true

-

manage_drwe

b

true|fals

e

Sets the Antivirus management

parameter.

To select the Antivirus management option in client template ClientTemplate:

>client_template.exe -u

ClientTemplate -manage_drweb

true

-make_dumps true|fals

e

Sets the Backup/restore

functions parameter.

To select the Backup/restore functions option in client template ClientTemplate:

>client_template.exe -u

ClientTemplate -make_dumps

true

-

remote_acce

ss_interfac

e

true|fals

e

Sets the Ability to use remote XML interface

parameter.

To select the Ability to use remote XML interface option in client template

ClientTemplate:

>client_template.exe -u

ClientTemplate -

remote_access_interface true

-

site_builde

r

true|fals

e

Sets the SiteBuilder parameter.

To select the SiteBuilder option in client template ClientTemplate:

>client_template.exe -u

ClientTemplate -site_builder

true

-

manage_perf

ormance

true|fals

e

Sets the Hosting performance management

parameter.

To select the Hosting performance management option in client template

ClientTemplate:

>client_template.exe -u

ClientTemplate -

manage_performance true

-

manage_iis_

app_pool

true|fals

e

Sets the IIS application pool management

parameter.

To select the IIS application pool management option in client template

ClientTemplate:

>client_template.exe -u

ClientTemplate -

manage_iis_app_pool true

-

manage_dash

board

true|fals

e

Sets the Desktop management

parameter.

Can be set to true

only if the -

dashboard option is

set to true.

To select the Desktop management option in client template ClientTemplate:

>client_template.exe -u

ClientTemplate -

manage_dashboard true

Page 37: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 37

Option Parameter Description Example

-dashboard true|fals

e

Sets the Desktop interface parameter.

Can be set to false

only if the -stdgui

option is set to true.

To select the Desktop interface option in client template ClientTemplate:

>client_template.exe -u

ClientTemplate -dashboard true

-

manage_webs

tat

true |

false Allows managing Web Statistics on the client's domains, namely, to choose which of the web statistics tools (or

none) to use.

If not defined, means false.

Available since Plesk 8.2.

To select the Web statistics management

option in client template ClientTemplate:

>client_template.exe -u

ClientTemplate -manage_webstat

true

-

manage_addi

tional_perm

issions

true|fals

e Allows enabling and disabling the Additional write/modify permissions option of

domain hosting, which, if enabled, means granting to the Plesk IIS User the Full access permission for the

domain httpdocs/

and httpsdocs/

files and subfolders (may be required for web applications correct functioning, but is insecure).

Set to false by

default.

Available since Plesk 8.2.

To select the Additional write/modify permissions management option in client

template ClientTemplate:

>client_template.exe -u

ClientTemplate -

manage_additional_permissions

true

Page 38: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 38

Option Parameter Description Example

-

manage_shar

ed_ssl

true|fals

e

Allows/prohibits a client created with the template to manage the Shared SSL feature: to make up one of the client's domains a Master SSL Domain which shares its SSL certificates with other domains, and to create shared SSL links to Master for his other domains.

Available since Plesk 8.2.

To select the Shared SSL Management option in client template ClientTemplate:

>client_template.exe -u

ClientTemplate -

manage_shared_ssl true

-stdgui true|fals

e

Sets the Standard

interface parameter.

Can be set to false

only if the -

dashboard option is

set to true.

To select the Standard interface option in

client template ClientTemplate:

>client_template.exe -u

ClientTemplate -stdgui true

-max_dom <number> Sets the Maximum number of domains limit. (type "-1" to set

the parameter to

Unlimited).

To set the Maximum number of domains limit in client template ClientTemplate to 50 domains:

>client_template.exe -u

ClientTemplate -max_dom 50

-

max_dom_ali

ases

<number> Sets the Maximum number of domain

aliases limit. (type "-

1" to set the

parameter to

Unlimited).

To set the Maximum number of domain aliases limit in client template

ClientTemplate to Unlimited:

>client_template.exe -u

ClientTemplate -

max_dom_aliases -1

-disk_space <number> Sets the Disk space limit (in MB). (type "-

1" to set the

parameter to

Unlimited).

To set the Disk space limit in client template ClientTemplate to 50 MB:

>client_template.exe -u

ClientTemplate -disk_space 50

-

max_traffic

<number> Sets the Maximum amount of traffic limit (in MB/month). (type

"-1" to set the

parameter to

Unlimited).

To set the Maximum amount of traffic limit in client template ClientTemplate to

500 MB/month:

>client_template.exe -u

ClientTemplate -max_traffic

500

-max_box <number> Sets the Maximum number of mailboxes

limit. (type "-1" to set

the parameter to

Unlimited).

To set the Maximum number of mailboxes limit in client template

ClientTemplate to 50:

>client_template.exe -u

ClientTemplate -max_box 50

Page 39: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 39

Option Parameter Description Example

-mbox_quota <number> Sets the Mailbox quota limit (in KB).

(type "-1" to set the

parameter to Unlimited).

To set the Mailbox quota limit in client template ClientTemplate to 50 KB:

>client_template.exe -u

ClientTemplate -mbox_quota 50

-

total_mboxe

s_quota

<number> Sets the Total mailboxes quota limit

(in MB). (type "-1" to

set the parameter to

Unlimited).

To set the Total mailboxes quota limit in client template ClientTemplate to 50 MB:

>client_template.exe -u

ClientTemplate -

total_mboxes_quota 50

-max_redir <number> Sets the Maximum number of mail redirects limit. (type

"-1" to set the

parameter to

Unlimited).

To set the Maximum number of mail redirects limit in client template

ClientTemplate to Unlimited:

>client_template.exe -u

ClientTemplate -max_redir -1

-max_mg <number> Sets the Maximum number of mail

groups limit. (type "-

1" to set the

parameter to

Unlimited).

To set the Maximum number of mail groups limit in client template

ClientTemplate to 100:

>client_template.exe -u

ClientTemplate -max_mg 100

-max_resp <number> Sets the Maximum number of mail autoresponders limit.

(type "-1" to set the

parameter to

Unlimited).

To set the Maximum number of mail autoresponders limit in client template

ClientTemplate to Unlimited:

>client_template.exe -u

ClientTemplate -max_resp -1

-max_wu <number> Sets the Maximum number of web users

limit. (type "-1" to set

the parameter to

Unlimited).

To set the Maximum number of web users limit in client template

ClientTemplate to 100:

>client_template.exe -u

ClientTemplate -max_wu 100

-

max_fpse_us

ers

<number> Sets the Maximum number of additional Microsoft FrontPage accounts limit. (type

"-1" to set the

parameter to

Unlimited).

To set the Maximum number of additional Microsoft FrontPage account limit in client template ClientTemplate to

Unlimited:

>client_template.exe -u

ClientTemplate -max_fpse_users

-1

-

max_subftp_

users

<number> Sets the Maximum number of additional FTP accounts limit.

(type "-1" to set the

parameter to

Unlimited).

To set the Maximum number of additional FTP accounts limit in client

template ClientTemplate to 100:

>client_template.exe -u

ClientTemplate -

max_subftp_users 100

Page 40: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 40

Option Parameter Description Example

-max_db <number> Sets the Maximum number of MySQL databases limit. (type

"-1" to set the

parameter to

Unlimited).

To set the Maximum number of MySQL databases limit in client template

ClientTemplate to Unlimited:

>client_template.exe -u

ClientTemplate -max_db -1

-

max_mssql_d

b

<number> Sets the Maximum number of Microsoft SQL Server databases limit. (type

"-1" to set the

parameter to

Unlimited).

To set the Maximum number of Microsoft SQL Server databases limit in client

template ClientTemplate to 100:

>client_template.exe -u

ClientTemplate -max_mssql_db

100

-

mysql_dbase

_space

<number> Sets the MySQL databases quota limit (in MB, the maximum disc space allowed for MySQL

databases). (type "-

1" to set the

parameter to

Unlimited).

To set the MySQL databases quota limit in client template ClientTemplate to

Unlimited:

>client_template.exe -u

ClientTemplate -

mysql_dbase_space -1

-

mssql_dbase

_space

<number> Sets the Microsoft SQL databases quota limit (in MB, the maximum disc space allowed for Microsoft SQL databases).

(type "-1" to set the

parameter to

Unlimited).

To set the Microsoft SQL databases quota limit in client template

ClientTemplate to 100 MB:

>client_template.exe -u

ClientTemplate -

mssql_dbase_space 100

-

max_maillis

ts

<number> Sets the Maximum number of mailing

lists limit. (type "-1"

to set the parameter

to Unlimited).

To set the Maximum number of mailing lists limit in client template

ClientTemplate to Unlimited:

>client_template.exe -u

ClientTemplate -max_maillists

-1

-

max_webapps

<number> Sets the Maximum number of Tomcat applications limit.

(type "-1" to set the

parameter to

Unlimited).

To set the Maximum number of Tomcat applications limit in client template

ClientTemplate to 100:

>client_template.exe -u

ClientTemplate -max_webapps

100

-max_subdom <number> Sets the Maximum number of subdomains limit.

(type "-1" to set the

parameter to

Unlimited).

To set the Maximum number of subdomains limit in client template

ClientTemplate to Unlimited:

>client_template.exe -u

ClientTemplate -max_subdom -1

Page 41: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 41

Option Parameter Description Example

-

max_iis_app

_pools

<number> Sets the Maximum number of IIS application pools

limit. (type "-1" to set

the parameter to

Unlimited).

To set the Maximum number of IIS application pools limit in client template

ClientTemplate to 100:

>client_template.exe -u

ClientTemplate -

max_iis_app_pools 100

-

max_shared_

ssl_links

<number> Sets the Maximum number of shared SSL links limit. (type

"-1" to set the

parameter to

Unlimited).

To set the Maximum number of shared SSL links limit in client template

ClientTemplate to Unlimited:

>client_template.exe -u

ClientTemplate -

max_shared_ssl_links -1

-max_odbc <number> Sets the Maximum number of ODBC connections limit.

(type "-1" to set the

parameter to

Unlimited).

To set the Maximum number of ODBC connections limit in client template

ClientTemplate to Unlimited:

>client_template.exe -u

ClientTemplate -max_odbc -1

-expiration <number><

Y|M|D>

Sets the Validity period limit starting from date when the client account was

created. (type "-1" to

set the parameter to

Unlimited).

To set the Validity period limit in client template ClientTemplate to 20 days:

>client_template.exe -u

ClientTemplate -expiration 20D

To set the Validity period limit in client template ClientTemplate to 1 year:

>client_template.exe -u

ClientTemplate -expiration 1Y

-ip_pool <add|del>

:<ip1>,

<ip2>,..,

<ipN>

Adds IP addresses to or deletes IP addresses from the client's IP address pool (Selected shared

IP addresses).

To add IP addresses 192.0.2.12 and 192.0.2.32 to client's IP address pool in

client template ClientTemplate:

>client_template.exe -u

ClientTemplate -ip_pool

add:192.0.2.12,192.0.2.32

-

excl_ip_num

<number> Selects the Allocate exclusive IP addresses to the client option and sets the maximum number of exclusive IP addresses to be allocated to client account (the Up to <...> IP addresses

field).

To enable allocation of 12 exclusive IP addresses to client's IP address pool in

client template ClientTemplate:

>client_template.exe -u

ClientTemplate -excl_ip_num 12

Page 42: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 42

Option Parameter Description Example

-use_sbnet true|fals

e

Selects the Create SiteBuilder user

option.

To enable automatic creation of a SiteBuilder user in client template

ClientTemplate:

>client_template.exe -u

ClientTemplate -use_sbnet true

Note: If the -dashboard and -stdgui options are not specified when a new client

template is created, the corresponding parameters will be set to true, that is, both the Standard interface and Desktop interface options will be enabled by default.

Page 43: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 43

Control Panel Appearance: server_pref.exe

The server_pref.exe utility serves to modify the appearance of Plesk Control Panel. This utility allows the following:

viewing a list of available locales

viewing a list of available skins

setting locale default for all users

setting skin default for all users

Syntax

server_pref.exe <command> [<locale|skin>]

Example

The following command sets the en-US locale and the WinXP Olivegreen skin as default ones.

>server_pref.exe --set-def-locale “ENGLISH (United States)” --set-def-

skin “WinXP Olivegreen”

Commands

Command Parameter Description Example

--set-def-

locale <locale> Sets default locale. To set the en-US locale as

default:

>server_pref.exe --

set-def-locale

“ENGLISH (United

States)”

--locales-

list Outputs a list of

available locales.

>server_pref.exe --

locales-list

--set-def-

skin <skin> Sets the default skin. To set the WinXP

Olivegreen skin as default:

>server_pref.exe --

set-def-skin “WinXP

Olivegreen”

--skins-list Outputs a list of available skins.

>server_pref.exe --

skins-list

--help or -h Displays help on the use of the utility.

>server_pref.exe --

help

Page 44: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 44

Custom Buttons: custombutton.exe

The custombutton.exe utility is designed to create custom buttons, and to manage their properties (interface location, button names, context help messages, and other parameters).

Custom buttons of the following types can be created and managed by using this utility:

custom button pointing to a URL

custom buttons linked to site applications

Note: This utility is available since Plesk 8.1.

Syntax

custombutton.exe <command> [

<option1> <param> [<option2> <param>]…[<option N> <param>]

]

Example 1

The following command line creates custom button CustomButton that opens URL http://example.com/webstore, places the custom button on domain administration pages, includes domain ID#, domain name, and client ID# in browser requests generated by clicking on the button, sets the context help message for the button as Click to go to http://example.com/webstore, and makes the button available in control panels of all domain users.

>custombutton.exe --create -text CustomButton -url

http://example.com/webstore -url_comp dom_id,dom_name,cl_id -conhelp

"Click to go example.com/webstore" -location domain -public true

Example 2

The following command line creates custom button named SiteApp linked to site application SiteApplication installed on domain example.com, and sets the context help message for the button as Click to open SiteApplication.

>custombutton.exe --create -siteapp-link -siteapp-domain example.com -

siteapp-name SiteApplication -text SiteApp -conhelp "Click to open

SiteApplication"

Page 45: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 45

Commands

Command Parameter Description Example

--create or -c

Creates a custom

button.

Requires the use of the -text and -url

options.

To create a new custom button CustomButton (to open URL http://example.com) and print its database ID number:

>custombutton.exe --create -

text CustomButton -url

http://example.com -print-id

or

>custombutton.exe -c -text

CustomButton -url

http://example.com -print-id

--info or -i <id#> Displays custom button's properties.

id# is the custom

button ID in Plesk database.

To display properties of a custom button with the database ID#14:

>custombutton.exe --info 14

or

>custombutton.exe -i 14

--remove or -r

<id#,id#,

...> Deletes one or more custom buttons.

id# is the custom

button ID in Plesk

database.

To delete custom buttons with ID# 14 and ID#56:

>custombutton.exe --remove

14,56

or

>custombutton.exe -r 14,56

--help or -h Displays help on the

use of the utility.

To view help on the use of the utility:

>custombutton.exe --help

or

>custombutton.exe -h

--man or -m Displays detailed help on the use of the utility

with examples.

To view detailed help with examples on the use of the utility:

>custombutton.exe --man

or

>custombutton.exe -m

Options

Option Parameter Description Example

-owner admin|<user

login

name>|<domai

n_name>

Assigns ownership of a custom button to a Plesk client. Is

set to admin by

default.

To set the client with login name ClientUser the owner of custom button

CustomButton to be created:

>custombutton.exe -c -text

CustomButton -url

http://example.com -owner

ClientUser

Page 46: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 46

Option Parameter Description Example

-sort_key <int> Sets the Priority parameter. Is set

to100 by default.

To set the priority of appearance of custom button CustomButton on a Plesk

page to 3:

>custombutton.exe -c -text

CustomButton -url

http://example.com -sort_key 3

-place client|domai

n|

navigation

Sets the Location parameter. Is set to

client (the Client

Home page option) by default. Other possible options: Domain Administration page

- domain,

Navigation pane -

navigation.

To select the Domain Administration page option for the Location parameter:

>custombutton.exe -c -text

CustomButton -url

http://example.com -place

domain

-text <button label> Specifies the text accompanying a custom button (the Button label parameter). Is

required for the --

create command.

Required with the --create

command.

To set Button Label for the custom

button to be created to CustomButton:

>custombutton.exe -c -text

CustomButton -url

http://example.com

-url <URL> Specifies the URL that a custom button to be created will point to (the URL parameter). Is

required for the --

create command

when creating custom buttons

pointing to URLs.

Required with the --create

command.

To set the URL parameter to example.com for custom button

CustomButton :

>custombutton.exe -c -text

CustomButton -url

http://example.com

Page 47: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 47

Option Parameter Description Example

-url_comp dom_id|

dom_name|

ftp_user|

ftp_pass|cl_

id| cname|

pname|email

Specifies various parameters to be included with the custom button's URL in browser

requests.

The following parameters can be

included:

dom_id - Include

domain ID

dom_name -

Include domain

name

ftp_user -

Include FTP user

name

ftp_pass -

Include FTP user

password

cl_id - Include

client ID

cname - Include

client's company

name

pname - Include

client's contact

name

email - Include

client's e-mail

To include domain ID, domain name, and client ID in the browser requests generated by using custom button

CustomButton:

>custombutton.exe -c -text

CustomButton -url

http://example.com -url_comp

dom_id,dom_name,cl_id

-conhelp <text> Specifies text of a contextual help message associated with a custom button (the Context help tip contents parameter).

To set the context help tip for the custom button CustomButton to Click to go to

example.com/webstore:

>custombutton.exe -c -text

CustomButton -url

http://example.com -conhelp

"Click to go to

example.com/webstore"

-file <path> Specifies path to the image file that will be used as the Background image for

a custom button.

To set file ButtonImage.gif as the Background image for the custom button

CustomButton:

>custombutton.exe -c -text

CustomButton -url

http://example.com -file

"C:\Program

Files\SWsoft\Plesk\

Images\PleskInterface\

ButtonImage.gif"

Page 48: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 48

Option Parameter Description Example

-public true|false Sets the Visible to all sub-logins parameter. Specifies whether a custom button appears in control panels of users subordinate to the custom button's owner. Is set to

false by default.

To display custom button CustomButton that has the Location parameter set to Domain Administration page in control

panels of all users on this domain:

>custombutton.exe -c -text

CustomButton -url

http://example.com -place

domain -public true

-internal true|false Sets the Open URL in the Control Panel parameter.(Specify if the button's URL is opened in Plesk own frame or in the new window.) Is set

to false by

default.

To enable opening of custom button's

URL in Plesk own frame:

>custombutton.exe -c -text

CustomButton -url

http://example.com -place

domain -internal true

-print-id Prints the database ID number of a created custom

button.

To create a new custom button CustomButton (to open example.com)

and print its database ID number:

>custombutton.exe --create -

text CustomButton -url

http://example.com -print-id

-siteapp-

link

Links a custom button with a site application installed

on a domain.

Used only with the -siteapp-

domain option.

To create a custom button CustomButton linked to a site application (if there is only a single application installed on a domain) that is accessible at URL

http://example.com/SiteApplication:

>custombutton.exe -c -text

CustomButton -url

http://example.com/SiteApplica

tion -siteapp-link -siteapp-

domain example.com

If there are more than one application installed on a domain, specify more options to identify the site application of

interest.

-siteapp-

domain

<domain> Specifies a domain on which a site application to be linked to a custom button is installed. I

Used only with the -siteapp-link

option.

To create a custom button CustomButton linked to a site application SiteApplication installed on domain example.com and accessible at URL http://example.com/SiteApplication:

>custombutton.exe -c -text

CustomButton -url

http://example.com/SiteApplica

tion -siteapp-link -siteapp-

domain example.com -siteapp-

name SiteApplication

Page 49: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 49

Option Parameter Description Example

-siteapp-

id

<int> Specifies the database ID# of a site application to be linked to a

custom button.

To create a custom button CustomButton linked to a site application with database ID# 12 installed on domain example.com and accessible at URL

http://example.com/SiteApplication:

>custombutton.exe -c -text

CustomButton -url

http://example.com/SiteApplica

tion -siteapp-link -siteapp-

domain example.com -siteapp-id

12

-siteapp-

name

<name> Specifies the name of a site application to be linked to a

custom button.

To create a custom button CustomButton linked to a site application SiteApplication installed on domain example.com and accessible at URL

http://example.com/SiteApplication:

>custombutton.exe -c -text

CustomButton -url

http://example.com/SiteApplica

tion -siteapp-link -siteapp-

domain example.com -siteapp-

name SiteApplication

-siteapp-

version

<string> Specifies the version of a site application to be linked to a custom

button.

To create a custom button CustomButton linked to a site application SiteApplication v.13.44.1 installed on domain example.com and accessible at

URL http://example.com/SiteApplication:

>custombutton.exe -c -text

CustomButton -url

http://example.com/SiteApplica

tion -siteapp-link -siteapp-

domain example.com -siteapp-

name SiteApplication -siteapp-

version 13.44.1

-siteapp-

release

<string> Specifies the release number of a site application to be linked to a

custom button.

To create a custom button CustomButton linked to a site application SiteApplication with release number 1312.121. installed on domain example.com and accessible at URL

http://example.com/SiteApplication:

>custombutton.exe -c -text

CustomButton -url

http://example.com/SiteApplica

tion -siteapp-link -siteapp-

domain example.com -siteapp-

name SiteApplication -siteapp-

version 1312.121

Page 50: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 50

Option Parameter Description Example

-siteapp-

prefix

<directory> Specifies the path (the Destination directory parameter) to the directory where the application is installed. The Destination directory parameter specifies the site application installation directory relative to the httpdocs

directory and is determined when installing site

application.

To create a custom button CustomButton linked to a site application SiteApplication which is installed in directory /httpdocs/siteapplication/v123 on domain example.com and accessible at URL

http://example.com/SiteApplication:

>custombutton.exe -c -text

CustomButton -url

http://example.com/SiteApplica

tion -siteapp-link -siteapp-

domain example.com -siteapp-

name SiteApplication -siteapp-

prefix siteapplication/123

-siteapp-

subdomain

<name> Specifies the name of a subdomain if site application is installed on the

subdomain.

To create a custom button CustomButton linked to a site application SiteApplication which is installed in on subdomain appsubdomain of domain example.com and accessible at URL

http://example.com/SiteApplication:

>custombutton.exe -c -text

CustomButton -url

http://appsubdomain.example.co

m/SiteApplication -siteapp-

link -siteapp-domain

example.com -siteapp-name

SiteApplication -siteapp-

subdomain appsubdomain

Page 51: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 51

Database Servers: database-server.exe

The database-server.exe utility is designed to manage database servers. The utility allows performing the following tasks:

adding and removing database servers to Plesk

changing database servers properties and connection settings

changing password of the database server administrator

setting default database server of a particular database type

Note: This utility is available since Plesk 8.1.

Syntax

database-server.exe <command> [

<option1> <param>

[<option2> <param>]…[<option N> <param>]

]

Example

The following command sets new password newdbapass for administrator (login dbadmin, current password dbadpass) on a remote Microsoft SQL database server

mssqlinstance1 available at 192.0.2.44.

>database-server.exe --update-server -type mssql -set

192.0.2.44/mssqlinstance1 -admin dbadmin -passwd dbapass set-passwd

newdbapass

Commands

Command Parameter Description Example

--create-

server

<host[:port]> Adds a database server record to

Plesk.

Requires the use of options -type, -

admin, -passwd

To create MySQL database server available at 192.0.2.33, with database server administrator's login admin and

password setup:

>database-server.exe --

create-server 192.0.2.33 -

type mysql -admin admin -

passwd setup

--update-

server

<host[:port]> Changes configuration settings for the specified database

server in Plesk.

To set password to newdbapass for administrator of a remote MySQL

server available at 192.0.2.16:3838:

>database-server.exe --

update-server

192.0.2.16:3838 -reset-

passwd newdbapass

Page 52: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 52

Command Parameter Description Example

--remove-

server <host[:port]> Removes a

database server

record from Plesk.

To remove MySQL database server available at 192.0.2.33:

>database-server.exe --

remove-server 192.0.2.33

--set-

default-

server

<host[:port]> Makes a database server primary among servers of the same type, meaning that if in Plesk a database is created for a domain, it is created on this,

default DB server.

To set the MySQL database server available at 192.0.2.33 as default for

newly created MySQL databases:

>database-server.exe --set-

default-server 192.0.2.33

--help or

-h

Displays help on the use of the

utility.

>database-server.exe --help

or

>database-server.exe -h

Options

Option Parameter Description Example

-type mysql|mssql Specifies the type of

a database server.

Used only with the --create-server

command.

Required with the --create-server

command.

To create MySQL database server available at 192.0.2.33, with database server administrator's login admin and

password setup:

>database-server.exe --create-

server 192.0.2.33 -type mysql

-admin admin -passwd setup

-set <host> |

<host>:<port

number> |

<port number>

Specifies the database server host, port number, or a combination of the

parameters.

To change the port on which local MySQL database server listens to from default

3306 to 22222:

>database-server.exe --update-

server localhost:3306 -set

22222

-admin <login name> Specifies database server administrator's login

name.

Required with the --create-server

command.

To create MySQL database server available at 192.0.2.33, with database server administrator's login admin and

password setup:

>database-server.exe --create-

server 192.0.2.33 -type mysql

-admin admin -passwd setup

Page 53: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 53

Option Parameter Description Example

-passwd <password> Specifies database server administrator's login

name.

Used only with the --create-server

command.

Required with the --create-server

command.

To create MySQL database server available at 192.0.2.33, with database server administrator's login admin and

password setup:

>database-server.exe --create-

server 192.0.2.33 -type mysql

-admin admin -passwd setup

-reset-

passwd

<password> Changes password of the database

server administrator.

To change administrator's password to 123456 for the local Microsoft SQL

Database server:

>database-server.exe --update-

server localhost -type mssql -

reset-passwd 123456

Page 54: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 54

Databases: database.exe

The database.exe utility serves to manage databases and database user accounts used by Plesk domains. The utility allows the following operations:

creating and removing databases

adding and removing database user accounts

editing database user credentials

Syntax

database.exe <command> [<db_name>] [

<option1><param> [<option2><param>]…[<option N><param>]

]

Example

The following command creates the MySQL database jdoe-gallery on domain1.com.

>database.exe --create jdoe-gallery -domain domain1.com -type mysql

Commands

Command Parameter Description Example

--create or -

c <db_name> Creates a

database with the specified

name.

To create the John_Doe_DB database on somewhere.com:

>database.exe --create

John_Doe_DB -domain

somewhere.com type-mysql

or

>database.exe -c John_Doe_DB -

domain somewhere.com type-mysql

--update or -

u <db_name> Updates the

database: adds, edits, removes a db

user.

To update the John_Doe_DB database with a new use:

>database.exe --update

John_Doe_DB -add_user Jim_Doe

or

>database.exe –u John_Doe_DB -

add_user Jim_Doe

Page 55: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 55

Command Parameter Description Example

--remove or -

r <db_name> Deletes the

specified

database.

To remove the John_Doe_DB database from somewhere.com:

>database.exe --remove

John_Doe_DB -domain

somewhere.com

or

>database.exe -r John_Doe_DB -

domain somewhere.com

--help or -h Displays help on the use of

the utility.

To see the help info on the use of this utility:

>database.exe -–help

or

>database.exe –h

Options

Option Parameter Description Example

-domain <domain_nam

e> Specifies the domain name.

Required when creating a

database.

To create MySQL database jdoe-gallery on

domain1.com.

>database.exe --

create jdoe-gallery -

domain domain1.com -

type mysql

-type mssql|mysql

Specifies the type of the database.

Either the -type of the -

server option is required

when creating a database.

To create MySQL database jdoe-gallery on

domain1.com.

>database.exe --

create jdoe-gallery -

domain domain1.com -

type mysql

-server <host[:port

]> Specifies the database server on which the

database resides.

Either the -type of the -

server option is required

when creating a database.

To create MySQL database jdoe-gallery for domain1.com

on the local MySQL server.

>database.exe --

create jdoe-gallery -

domain domain1.com -

server localhost:3306

-passwd <passwd> Sets the DB user password.

Required when creating a database user.

Used with either the -

add_user or -

update_user option.

To change password to 123456 for the DBadmin user of the jdoe-gallery

database:

>database.exe --

update jdoe-gallery -

update_user DBadmin -

passwd 123456

Page 56: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 56

Option Parameter Description Example

-add_user <login> Creates a database user.

Requires use of the -

passwd option.

To create the Jim_Doe user of the jdoe-gallery database

users:

>database.exe --

update jdoe-gallery -

add_user Jim_Doe -

passwd ghTTfs65Rfs

-update_user <login> Changes the DB user credentials (password

and/or login name).

To rename the DBadmin user of the jdoe-gallery

database to DBA:

>database.exe --

update jdoe-gallery -

update_user DBadmin -

user_name DBA

-remove_user <login> Removes the DB user with the specified name from

the database.

To remove the John_Doe DB user:

>database.exe --

update John_Doe_DB -

remove_user John_Doe

-user_name <login> Sets the login name for the DB user.

Used with the -

update_user option only.

To rename the DBadmin user of the jdoe-gallery

database to "DBA":

>database.exe --

update jdoe-gallery -

update_user DBadmin -

user_name DBA

Page 57: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 57

Desktop Presets: desktop.exe

The desktop.exe utility serves to manage Plesk desktop presets.

Note: The utility is available since Plesk 8.1.

Syntax

desktop.exe <command> [<option1><param1>[<param2>…<param n>]

[<option2><param1>[<param2>…<param n>]]

…[<option N><param1>[<param2>…<param n>]]

]

Example

The following command adds desktop preset AdminDesktop to the administrator's repository of desktop presets and allows overwriting of the preexisting desktop with the same name.

>desktop.exe --add-preset C:\Program

Files\SWsoft\Plesk\AdminDesktop.xml -overwrite true

Commands

Command Parameter Description Example

--set-admin or -sa

Changes type of an existing desktop preset to the Administrator's desktop preset

type.

Requires the

use of the -desktop-

preset option.

To set existing desktop preset named AdminDesktop as an administrator's

desktop preset:

>desktop.exe --set-admin -

desktop-preset AdminDesktop

or

>desktop.exe -sa -desktop-

preset AdminDesktop

--update-

preset or -up

<preset

name>

Updates properties of a

desktop preset.

Requires the use of the -

type option.

To change the type of desktop preset named AdminDesktop to Domain owner's

desktop preset:

>desktop.exe --update-preset -

desktop-preset AdminDesktop -

type domain

or

>desktop.exe -up AdminDesktop -

type domain

--preset-lists

or -pl

Displays the list of existing desktop

presets.

To display the list of available desktops:

>desktop.exe --preset-lists

or

>desktop.exe -pl

Page 58: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 58

Command Parameter Description Example

--add-preset

or -ap

<file

name>

Adds a preset to administrator's repository of desktop

presets.

To add a desktop preset AdminDesktop to the administrator's repository of desktop presets from a desktop preset file

AdminDesktop.xml:

>desktop.exe --add-preset

C:\Program

Files\SWsoft\Plesk\AdminDesktop

.xml

or

>desktop.exe --ap C:\Program

Files\SWsoft\Plesk\AdminDesktop

.xml

--remove-

preset or -rp

<preset

name>

Deletes a desktop preset from administrator's repository of desktop

presets.

To add a desktop preset to the administrator's repository of desktop presets from a desktop preset file

AdminDesktop.xml:

>desktop.exe --remove-preset

AdminDesktop

or

>desktop.exe -rp AdminDesktop

--help or -h Displays help on the use of

the utility.

To view help on the use of the utility:

>desktop.exe --help

or

>desktop.exe -h

Options

Option Parameter Description Example

-

desktop-

preset

<preset

name> Sets desktop preset.

To set existing desktop preset named AdminDesktop as an administrator's desktop

preset:

>desktop.exe -sa -desktop-preset

AdminDesktop

-default true|false Renders desktop preset the default preset for the Plesk users category specified by the option -

type.

To set desktop AdminDesktop as the default desktop for Plesk administrators:

>desktop.exe -up AdminDesktop -

default true -type admin

Page 59: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 59

Option Parameter Description Example

-

overwrit

e

true|false Allows overwriting of a desktop preset with another desktop with the same

name.

Used with the --add-preset

command.

To add a desktop preset AdminDesktop to the administrator's repository of desktop presets from a desktop preset file

AdminDesktop.xml and replace existing

desktop with the same name in Plesk:

>desktop.exe --add-preset

"C:\Program

Files\SWsoft\Plesk\AdminDesktop.xm

l" -overwrite true

-type admin|clie

nt|domain

Sets desktop preset type:

admin - Default

Administrator's

desktop, domain -

Default domain owner desktop,

client - Default

client desktop.

To change the type of desktop preset named AdminDesktop to Domain owner's desktop

preset:

>desktop.exe --update-preset -

desktop-preset AdminDesktop -type

domain

Page 60: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 60

Domain Accounts: domain.exe

The domain.exe utility serves to manage domains and allows the following operations:

creating, renaming, and removing domain accounts

enabling/disabling the existing domains

managing domain user accounts

managing domain hosting parameters like scripting languages support, log settings, hard disk limits, etc.

Syntax

domain.exe <command> [<domain_name>] [

<option1><param> [<option2><param>]…[<option N><param>]

]

Example

The following command creates for client account John_Doe a domain account with name domain1.com and disables the domain administrator account. Then, the command makes the domain available when accessing it with the www prefix, enables hosting for the domain, binds the domain with IP address 192.0.2.54 (since not specified explicitly, physical hosting is used). Then, the command enables CGI support on the domain and disables sending the domain created notification to Plesk administrator.

>domain.exe --create domain1.com -clogin John_Doe -dom_user false -www

true -hosting true -ip 192.0.2.54 -cgi true -notify false

Commands

Command Parameter Description Example

--create or -c <domain_name> Creates a domain.

To create domain with name sampledomain.com for client with

login John_Doe:

>domain.exe --create

sampledomain.com -clogin

John_Doe

or

>domain.exe -c

sampledomain.com -clogin

John_Doe

Page 61: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 61

Command Parameter Description Example

--update or -u <domain_name> Changes properties of the existing

domain.

To limit the amount of disk space that sampledomain.com can occupy

to 200 Mbytes:

> domain.exe --update

sampledomain.com -

hard_quota 200

or

>domain.exe -u

sampledomain.com -

hard_quota 200

--remove or -r <domain_name> Removes a domain.

To remove sampledomain.com:

>domain.exe --remove

sampledomain.com

or

>domain.exe -r

sampledomain.com

--info or -i <domain_name> Retrieves a domain info.

To retrieve information about sampledomain.com:

>domain.exe --info

sampledomain.com

or

>domain.exe --i

sampledomain.com

--on <domain_name> Enables a

domain.

To enable sampledomain.com:

>domain.exe --on

sampledomain.com

--off <domain_name> Disables a domain.

To disable sampledomain.com:

>domain.exe --off

sampledomain.com

--help or -h Displays help on the use of

the utility.

To output the help info on the use of this utility:

>domain.exe --help

or

>domain.exe -h

Options

Option Parameter Description Example

-status true|fals

e Enables/Disables the domain.

Default value is true.

To enable sampledomain.com:

>domain.exe --update

sampledomain.com -

status true

Page 62: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 62

Option Parameter Description Example

-new_name <domain> Renames the specified domain.

To rename the domain from sampledomain.com to

sampledomain1.com:

>domain.exe --update

sampledomain.com -

new_name

sampledomain1.com

-dom_user true|fals

e Enables/Disables domain

administrator account.

Default value is false.

To enable the domain user account for

sampledomain.com:

>domain.exe --update

sampledomain.com -

dom_user true

-du_passwd <passwd> Sets password for the

domain administrator.

To enable the domain user account with password somepass for sampledomain.com:

>domain.exe --update

sampledomain.com -

dom_user true -

du_passwd somepass

-du_pname <string> Sets personal name of domain administrator.

To set the name for the sampledomain.com domain

user to "John":

>domain.exe --update

sampledomain.com -

du_pname John

-du_email <string> Sets e-mail address of

domain administrator.

To set the e-mail address for the domain user of sampledomain.com to

[email protected]:

domain.exe --update

sampledomain.com -

du_email

[email protected]

-

du_language <string> Sets the CP interface

language for domain

administrator.

The value is two first letters of the language name (e.g.,

it for Italian).

To set Italian as the interface language for the domain user

of sampledomain.com:

>domain.exe --update

sampledomain.com -

du_language it

-dns true|fals

e Enables DNS zone for a domain. By default, settings from the current server-wide

DNS template is used.

To enable the DNS zone for sampledomain.com:

>domain.exe -u

sampledomain.com -dns

true

Page 63: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 63

Option Parameter Description Example

-www true|fals

e Allows/Prohibits accessing the domain using URL with

the www prefix.

Default value is true.

To remove the www prefix from sampledomain.com:

>domain.exe --update

sampledomain.com -www

false

-hosting true|fals

e Enables/Disables hosting for the domain.

Default value is false.

To enable hosting for sampledomain.com:

>domain.exe --update

sampledomain.com -

hosting true

-hst_type phys |

std | frm Sets up the type of hosting for a domain.

Here, phys means physical

hosting, std standard

forwarding hosting, and frm

frame forwarding hosting.

Default value is phys

(physical).

To set up standard forwarding hosting on

sampledomain.com:

>domain.exe --update

sampledomain.com -

hst_type std -login

sampledomain

-target_url <URL> Sets the target URL for

forwarding hosting types.

Required if the -hst_type

option is set to std or frm.

To set up standard forwarding to the target URL sample2345.com for

sampledomain.com:

>domain.exe --update

sampledomain.com -

hst_type std -

target_url

www.sample2345.com

-ip <ip_addre

ss> Specifies the IP address to be associated with new domain. If the domain is configured for physical hosting, the specified IP address will be used for

physical hosting.

To associate IP address 192.0.2.33 with sampledomain.com configured

for physical hosting:

>domain.exe --create

sampledomain.com -

hosting true -ip

192.0.2.33

-login <login> Sets the login name for the FTP user having access to

the domain files structure.

Required if physical hosting is specified.

To create the FTP user‟s login for the domain user of sampledomain.com, provided that the domain is configured

to use physical hosting:

>domain.exe --update

sampledomain.com -

login New_FTP_user

-passwd <password

> Sets the FTP password.

No password is set by default.

To setup password New_Password for accessing sampledomain.com files

structure via FTP:

>domain.exe --update

sampledomain.com -

passwd New_Password

Page 64: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 64

Option Parameter Description Example

-shell “Login

Disabled”

| “Login

Enabled”

Enables/Disables access to the system via remote

desktop panel (RDP).

Default value is “Login

Disabled”.

To enable access to the system via RDP:

>domain.exe --update

sampledomain.com -

shell "Login Enabled"

-hard_quota <integer> Sets the maximal amount of disk space allotted for the

domain files (in Mbytes).

0 means unlimited.

To set the 100 Mbytes disk

quota for sampledomain.com:

>domain.exe --update

sampledomain.com -

hard_quota 100

-sb_publish true|fals

e Enables/Disables the creation and publishing of an empty site by SiteBuilder when creating a new domain for the client with SB

support.

Default value is true.

Used with --create only.

Available since Plesk 7.5.6.

Not to create and publish an empty site when creating

somedomain.com:

>domain.exe --create

somedomain.com -clogin

johndoe -sb_publish

false

-fp true|fals

e Enables/Disables FrontPage support on a domain.

Default value is false.

To enable FrontPage support on sampledomain.com:

>domain.exe --update

sampledomain.com -fp

true

-fp_ssl true|fals

e Enables/Disables FrontPage Over SSL support on the

domain.

Default value is false.

To enable FrontPage Over SSL support on

sampledomain.com:

>domain.exe --update

sampledomain.com -

fp_ssl true

-fpauth true|fals

e Enables/Disables FrontPage authorization.

Default value is false.

To enable FrontPage authorization on

sampledomain.com:

>domain.exe --update

sampledomain.com -

fpauth true

-

fp_no_index true|fals

e Defines whether FrontPage uses native WAIS search engine, or IIS Index Server

for indexing web sites.

Default value is false.

If on Virtuozzo, default value is true.

Available since Plesk 8.1.1.

To make FrontPage use IIS Index Service on domain

sampledomain.com:

>domain.exe -u

sampledomain.com -

fp_no_index false

Page 65: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 65

Option Parameter Description Example

-ssi true|fals

e Enables/Disables SSI support on the domain.

Default value is false.

To enable SSI support on sampledomain.com:

>domain.exe --update

sampledomain.com -ssi

true

-ssi_html true|fals

e Enables/Disables SSI support for HTML and HTM

files on the domain.

Default value is false.

To enable SSI support for HTML and HTM files on

sampledomain.com:

>domain.exe -u

sampledomain.com -

ssi_html true

-php true|fals

e Enables/Disables PHP support on the domain.

Default value is false.

To enable PHP support on sampledomain.com:

>domain.exe --update

sampledomain.com -php

true

-

php_version

4|5 Sets up which PHP version should be default on a

domain.

Default value is 4.

To set PHP v.5 default on domain sampledomain.com:

>domain.exe -u

sampledomain.com -

php_version 5

-php_isapi true|fals

e Enables/Disables running PHP as an ISAPI extension.

Default value is false.

To enable running PHP as an ISAPI extension on

sampledomain.com:

>domain.exe -u

sampledomain.com -php-

isapi true

-cgi true|fals

e Enables/Disables CGI support on a domain.

Default value is false.

To enable CGI support on sampledomain.com:

>domain.exe --update

sampledomain.com -cgi

true

-perl true|fals

e Enables/Disables Perl support on a domain.

Default value is false.

To enable Perl support on sampledomain.com:

>domain.exe --update

sampledomain.com -perl

true

-asp true|fals

e Enables/Disables ASP support on a domain.

Default value is false.

To enable ASP support on sampledomain.com:

>domain.exe --update

sampledomain.com -asp

true

-python true|fals

e Enables/Disables Python support on a domain.

Default value is false.

To enable Python support on sampledomain.com:

>domain.exe --update

sampledomain.com -

python true

-coldfusion true|fals

e Enables/Disables ColdFusion support on a

domain.

Default value is false.

To enable ColdFusion support on sampledomain.com:

>domain.exe --update

sampledomain.com -

coldfusion true

Page 66: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 66

Option Parameter Description Example

-miva true|fals

e Enables/Disables Miva support on a domain.

Default value is false.

To enable Miva support on sampledomain.com:

>domain.exe --update

sampledomain.com -miva

true

-ssl true|fals

e Enables/Disables accessing

a domain via SSL.

Default value is false.

To enable SSL support on

sampledomain.com:

>domain.exe --update

sampledomain.com -ssl

true

-webstat none |

webalizer

| awstats

|

smarterst

ats |

urchin

Sets up which web statistics tool should be used on a

domain.

Default value is none.

To set Webalizer used on sampledomain.com:

>domain.exe --update

sampledomain.com -

webstat webalizer

-err_docs true|fals

e Allows/Prohibits using custom HTTP error

messages on a domain.

Default value is false

(meaning standard error

messages).

To allow custom error documents on

sampledomain.com:

>domain.exe --update

sampledomain.com -

err_docs true

-

write_modif

y

true|fals

e Allows/Prohibits granting to the Plesk IIS User the Full access permission for the

domain httpdocs/ and

httpsdocs/ files and

subfolders (may be required for web applications correct

functioning, but is insecure).

Set to false by default.

Available since Plesk 8.1.1.

To allow Plesk IIS User write and modify files and subfolders

in httpdocs/ and

httpsdocs/ folders of

sampledomain.com:

>domain.exe --update

sampledomain.com -

write_modify true

-

iis_app_poo

l

true|fals

e Allows/Prohibits using dedicated IIS application

pool for a domain.

Default value is false.

To allow using dedicated IIS application pool on

sampledomain.com:

>domain.exe --update

sampledomain.com -

iis_app_pool true

-cpu_usage <integer> Defines the maximum CPU

usage by domain (in %).

To limit the maximum CPU usage by sampledomain.com

to 3%:

>domain.exe -u

sampledomain.com -

cpu_usage 3

Page 67: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 67

Option Parameter Description Example

-log_rotate true|fals

e Enables/Disables log rotation on the domain.

Default value is false.

To disable log rotation for sampledomain.com:

>domain.exe --update

sampledomain.com -

log_rotate false

-log_bysize <integer> Enables/Disables the processing of log files by size (the processing starts once the specified size is

achieved). In kbytes.

To enable the processing of sampledomain.com log files when their size comes up to 200 kbytes:

>domain.exe --update

sampledomain.com -

log_bysize 200

-log_bytime daily |

weekly |

monthly

Enables the processing of log files by time.

Default value is daily.

To set up weekly log rotation for sampledomain.com:

>domain.exe --update

somehwhere.com -

log_bytime weekly

-

log_max_num <integer> Specifies the maximum

number of stored log files.

Default value is 3.

To set the maximum number of log files to 5 for sampledomain.com:

>domain.exe --update

sampledomain.com -

log_max_num 5

-

log_compres

s

true|fals

e Enables/Disables log file compression.

Default value is true.

To disable log file compression for sampledomain.com:

>domain.exe --update

sampledomain.com -

log_compress false

-log_email <e-mail> Enables sending log files to

the specified e-mail address.

To enable sending the log file of sampledomain.com to [email protected]

m:

>domain.exe --update

sampledomain.com -

log_email

John_Doe@sampledomain.

com

-clogin <login> Specifies the login name of an existing client who

possess a domain.

Required with --create.

To change an owner of sampledomain.com to Jane

Doe:

>domain.exe --update

sampledomain.com -

clogin Jane_Doe

-

mail_servic

e

true|fals

e Enables/Disables running mail service on a domain.

Default value is true.

To disable mail service on sampledomain.com:

>domain.exe --update

sampledomain.com -

mail_service false

Page 68: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 68

Option Parameter Description Example

-notify true|fals

e Enables/Disables sending the „domain created‟ notification to Plesk

administrator.

Default value is true.

To disable sending the notification:

>domain.exe --create

sampledomain.com -

notify false

-asp.net true|fals

e Enables/Disables supporting Microsoft ASP.NET

Framework on a domain.

Default value is false.

To enable Microsoft ASP.NET Framework support on

sampledomain.com:

>domain.exe -u

sampledomain.com -

asp.net true

-

asp.net_ver

sion

1.1|2.0 Sets the default version of Microsoft ASP.NET

Framework for a domain.

Default value is 1.1.

Available since Plesk 7.5.6.

To make .NET v.2.0.x default on sampledomain.com:

>domain.exe -u

sampledomain.com -

asp.net_version 2.0

-

sb_subdomai

ns_create

true|fals

e

When creating a new domain for the client with SiteBuilder 3.x support, this option enables/disables creating and publishing two subdomains (blog and photo

gallery) by SB.

Default value is false.

Used with --create only.

Available since Plesk 7.6.

To enable creating and publishing blog, and photo gallery subdomains when creating somedomain.com for

a client with SB 3.x support :

>domain.exe --create

somedomain.com -

sb_subdomains_create

true

-

fp_smtp_hos

t

<host

name>

Specifies Microsoft FrontPage SMTP server on

a domain.

By default, the mail server address defined by MX record in the domain's DNS zone is set. If the MX record is not specified, the parameter is set to

localhost.

To set mail.example.com as the FrontPage SMTP server for domain

sampledomain.com:

>domain.exe -u

sampledomain.com -

fp_smtp_host

mail.example.com

Page 69: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 69

Option Parameter Description Example

-

fp_mail_fro

m

<e-mail

address>

Specifies Microsoft FrontPage From address on

a domain.

By default, the address is set to that of the domain administrator. If the domain administrator account is not configured or their e-mail address is not specified, the domain owner's e-mail address is used. If the client's e-mail address is not specified, then the Plesk administrator's address is

used.

To set the Microsoft FrontPage From address to

[email protected]:

>domain.exe -u

sampledomain.com -

fp_mail_from

[email protected]

-

fp_mail_rep

ly_to

<email

address>

Specifies Microsoft FrontPage Reply to address

on domain.

By default, the address is set to that of the domain administrator. If the domain administrator account is not configured or their e-mail address is not specified, the domain owner's e-mail address is used. If the client's e-mail address is not specified, then the Plesk administrator's address is

used.

To set the Microsoft FrontPage mail settings: Reply to address

to [email protected]:

>domain.exe -u

sampledomain.com -

fp_mail_reply_to

[email protected]

Page 70: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 70

Domain Administrator Accounts: domadmin.exe

The domadmin.exe utility is designed to manage domain administrators via CLI. The utility allows the following operations:

editing domain administrator's personal information

viewing the information about the domain

changing the domain management preferences (control panel access and interface features) and permissions

Note: This utility and all its commands and options are available since Plesk 8.1.

Syntax

domadmin.exe <command> <domain name> [

<option1><param> [<option2><param>]…[<option N><param>]

]

Example

The following command line sets the personal name Mary Jones for the domain administrator of example.com, allows the use of the standard user interface only, sets the administrator's password to log in to mypass, sets the interface language to Russian, and allows the domain content management by the domain administrator.

>domadmin.exe --update example.com -pname "Mary Jones" -dashboard

false -stdgui true -passwd mypass -locale ru -manage_phosting true

Commands

Command Parameter Description Example

--update

or -u

<domain_n

ame> Updates configuration of the existing domain administrator's account with data specified in

the options.

To change a password for the domain administrator's account:

>domadmin.exe --update

example.com -passwd

newpassword

or

>domadmin.exe -u example.com

-passwd newpassword

--info or -i

<domain_n

ame> Displays information about the specified domain administrator's

account.

To view the information on the administrator's account on

example.com:

>domadmin.exe --info

example.com

or

>domadmin.exe -i example.com

Page 71: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 71

Command Parameter Description Example

--help

or -h Displays help on the

use of the utility. To view the help info on the use of this utility:

>domadmin.exe –help

or

>domadmin.exe -h

Options

Option Parameter Description Example

-status true |

false

Enables or disables the domain administrator's access to control panel (the Allow domain administrator access

parameter).

To disable domain administrator access to control panel:

>domadmin.exe --update

example.com -status false

-passwd <passwd> Sets the domain administrator's

password.

To change the administrator's password to newpassword on

example.com:

>domadmin.exe -u example.com

-passwd newpassword

-pname <string> Sets Personal name for the domain

administrator

To change the administrator's Personal name to Firstname

Lastname on example.com:

>domadmin.exe -u example.com

-pname "Firstname Lastname"

-company <string> Sets Company name for the domain

administrator

To change the administrator's Company name to new name on

example.com:

>domadmin.exe -u example.com

-company "new name"

-phone <number> Sets the phone number (Phone) for the domain

administrator

To change the domain administrator's phone number to 123123123 on

example.com:

>domadmin.exe -u example.com

-phone 123123123

-fax <number> Sets the Fax number (Fax) for the domain

administrator

To change the domain administrator's fax number to 123123123 on

example.com:

>domadmin.exe -u example.com

-fax 123123123

-email <string> Sets the e-mail address for the domain

administrator

To change the domain administrator's E-mail to [email protected] on

example.com:

>domadmin.exe -u example.com

-email

[email protected]

m

Page 72: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 72

Option Parameter Description Example

-address <string> Sets the street address for the domain

administrator

To change the domain administrator's Address to 22 Drury lane on

example.com:

>domadmin.exe -u example.com

-address "22 Drury lane"

-city <string> Sets the city for the

domain administrator

To change the domain administrator's

City to Anytown City on example.com:

>domadmin.exe -u example.com

-address "Anytown City"

-state <string> Sets the state for the domain administrator

To change the domain administrator's State/Province to Texas on

example.com:

>domadmin.exe -u example.com

-state Texas

-zip <string> Sets ZIP/postal code for the domain

administrator

To change the domain administrator's Postal/ZIP code to 123123xx on

example.com:

>domadmin.exe -u example.com

-zip 123123xx

-country <string> Sets the country for the domain administrator

To change the domain administrator's Country to AnyCountry on

example.com:

>domadmin.exe -u example.com

-country AnyCountry

-locale <string> Sets the control panel interface language (e.g.

it for Italian)

To change the Domain administrator's language parameter to Italian on

example.com:

consult ISO-3166 for the language code (for example, it is for Italian),

then

>domadmin.exe -u

example.com -locale it

-multiple-

sessions

true |

false Sets the Allow multiple sessions parameter

To allow multiple sessions to run simultaneously on the domain

administrator account:

>domadmin.exe -u example.com

-multiple-sessions true

-max-

button-

length

<int> Sets the Button label length parameter for the domain administrator's control

panel

To change the button label length for the domain administrator's control

panel to XX:

>domadmin.exe -u example.com

-max-button-length XX

-skin <string> Sets the Domain administrator's interface

skin

To change the domain administrator's control panel interface skin to WinXP

Reloaded:

>domadmin.exe -u example.com

-skin "WinXP Reloaded"

Page 73: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 73

Option Parameter Description Example

-lock-

screen

true |

false

Sets the Prevent working with Plesk until page is completely

loaded parameter.

To prevent users from working with the control panel until control panel

screens are completely loaded:

>domadmin.exe -u example.com

-lock-screen true

-desktop-

preset

<string> Sets the Desktop

preset parameter

To change the domain administrator's Desktop to the Default Domain Owner

Desktop preset:

>domadmin.exe -u example.com

-desktop-preset "Default

Domain Owner Desktop"

-

manage_pho

sting

true |

false

Sets the Physical hosting management

parameter.

To allow physical hosting management on the domain by the

domain administrator:

>domadmin.exe -u example.com

-manage_phosting true

-

manage_sh_

access

true |

false

Sets the System access management

parameter.

To enable shell access to the domain by the domain administrator:

>domadmin.exe -u example.com

-manage_sh_access true

-

manage_quo

ta

true |

false

Sets the Hard disk quota assignment

parameter.

To allow changing hard disk quota on the domain by the domain

administrator:

>domadmin.exe -u example.com

-manage_quota true

-

manage_sub

domains

true |

false Sets the Subdomains management

parameter.

To allow managing subdomains by the domain administrator:

>domadmin.exe -u example.com

-manage_subdomains true

-

manage_dom

ain_aliase

s

true |

false

Sets the Domain Aliases management

parameter.

To allow managing domain aliases by the domain administrator:

>domadmin.exe -u example.com

-manage_domain_aliases true

-

manage_log

true |

false Sets the Log rotation management

parameter.

To allow managing log rotation by the domain administrator:

>domadmin.exe -u example.com

-manage_log true

-

manage_ano

nftp

true |

false

Sets the Anonymous FTP management parameter.

To allow managing anonymous FTP

access by the domain administrator:

>domadmin.exe -u example.com

-manage_anonftp true

-

manage_sub

ftp

true |

false

Sets the FTP account management

parameter.

To allow managing additional FTP accounts by the domain administrator:

>domadmin.exe -u example.com

-manage_subftp true

-

manage_cro

ntab

true |

false

Sets the Scheduler management

parameter.

To allow managing scheduler by the

domain administrator:

>domadmin.exe -u example.com

-manage_crontab true

Page 74: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 74

Option Parameter Description Example

-

manage_dns

true |

false

Sets the DNS zone management

parameter.

To allow managing DNS by the domain administrator:

>domadmin.exe -u example.com

-manage_crontab -manage_dns

true

-

manage_web

apps

true |

false

Sets the Tomcat applications management

parameter.

To allow managing Tomcat web applications by the domain

administrator:

>domadmin.exe -u example.com

-manage_webapps true

-

manage_mai

llists

true |

false

Sets the Mailing lists management

parameter.

To allow managing mailing lists by the

domain administrator:

>domadmin.exe -u example.com

-manage_maillists true

-

manage_drw

eb

true |

false

Sets the Antivirus management

parameter.

To allow managing the DrWeb antivirus

application by the domain administrator:

>domadmin.exe -u example.com

-manage_drweb true

-

make_dumps

true |

false

Sets the Backup/restore

functions parameter.

To allow managing backup/restore functions by the domain administrator:

>domadmin.exe -u example.com

-make_dumps true

-

site_build

er

true |

false Sets the SiteBuilder parameter.

To allow managing SiteBuilder by the domain administrator:

>domadmin.exe -u example.com

-site_builder true

-

manage_per

formance

true |

false

Sets the Hosting performance management

parameter.

To allow managing hosting performance by the domain administrator:

>domadmin.exe -u example.com

-manage_performance true

-

manage_iis

_app_pool

true |

false

Sets the IIS application pool management

parameter.

To allow managing IIS application pool by the domain administrator:

>domadmin.exe -u example.com

-manage_iis_app_pool true

-

manage_web

stat

true |

false Allows managing Web Statistics on the domain, namely, to choose which of the web statistics tools (or

none) to use.

If not defined, means false.

Available since Plesk 8.1.1.

To allow managing web statistics by

the domain administrator:

>domadmin.exe -u example.com

- manage_webstat true

Page 75: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 75

Option Parameter Description Example

-

manage_add

itional_pe

rmissions

true |

false

Allows enabling and disabling the Additional write/modify permissions option of domain hosting, which, if enabled, means granting to the Plesk IIS User the Full access permission for the

domain httpdocs/

and httpsdocs/ files

and subfolders (may be required for web applications correct functioning, but is

insecure).

Set to false by

default.

Available since Plesk 8.1.1.

To allow managing the Additional write/modify permissions option by

the domain administrator:

>domadmin.exe -u example.com

-

manage_additional_permission

s true

-

manage_spa

mfilter

true |

false

Allows configuring Spam Filtering on the mail account level (if the correspondent option is enabled in the server-wide

configuration).

Available since Plesk 8.1.1.

To allow domain administrator to configure Spam Filtering on his domain:

>domadmin.exe --update

example.com -

manage_spamfilter true

-

manage_das

hboard

true |

false

Sets the Desktop management

parameter.

Can be set to true

only if the -

dashboard option is

set to true.

To allow managing Desktop by the domain administrator:

>domadmin.exe -u example.com

-manage_dashboard true

-dashboard true |

false

Enables or disables the use of the Desktop interface by a domain administrator. Sets the User interface parameter (the Desktop and standard interface are allowed and Only Desktop interface is

allowed options only).

Can be set to false

only if the -stdgui

option is set to true.

To allow the use of Desktop interface by the administrator of domain example.com:

>domadmin.exe -u

example.com -dashboard

true

To allow the use of standard interface by the domain administrator:

>domadmin.exe -u

example.com -stdgui

Page 76: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 76

Option Parameter Description Example

-stdgui true |

false

Enables or disables the use of the standard interface by a domain administrator. Sets the User interface parameter (the Desktop and standard interface are allowed and Only standard interface is

allowed options only).

Can be set to false

only if the -dashboard

option is set to true.

true

To set the Desktop and standard interface are allowed option for the User interface parameter:

>domadmin.exe -u

example.com -dashboard

true -stdgui true

To set the Only standard interface is allowed option for the User interface parameter:

>domadmin.exe -u

example.com -dashboard

false -stdgui true

To set the Only Desktop interface is allowed option for the User interface parameter:

>domadmin.exe -u

example.com -dashboard

true -stdgui false

Page 77: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 77

Domain Aliases: domalias.exe

The domalias.exe utility is designed to manage domain aliases. The utility allows the following operations:

creating and deleting domain aliases

viewing information about domain aliases

enabling and disabling Web and mail services on domain aliases

Note: This utility is available only since Plesk 8.1.

Syntax

domalias.exe <command> [

<option1> <param> [<option2> <param>]…[<option N> <param>]

]

Example

The following command line creates domain alias example.com for domain

example.net, sets the status of the domain alias to that of the parent domain

example.net, and enables mail service on the domain alias.

>domalias.exe --create example.com -domain example.net -status parent

-mail true

Commands

Command Parameter Description Example

--create

or -c

<alias

name>

Creates a new domain alias.

Requires specifying the -domain

option.

To create a new domain alias example.com for domain example.net

>domalias.exe --create

example.com -domain example.net

--update

or -u

<alias

name>

Updates configuration of an existing domain alias with the data specified in the

options.

To enable mail service on domain alias example.com:

>domalias.exe --update

example.com -mail true

or

>domalias.exe -u example.com -

mail true

--remove

or -r

<alias

name>

Deletes a domain alias.

To delete domain alias example.com:

>domalias.exe --remove

example.com

or

>domalias.exe -r example.com

Page 78: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 78

Command Parameter Description Example

--remove-

all or -ra

<parent

domain>

Deletes all domain aliases for specified

domain

To delete all domain aliases for domain example.net:

>domalias.exe --remove-all

example.net

or

>domalias.exe -ra example.net

--info or

-i

<alias

name>

Displays a information about

domain alias.

To view information about domain alias example.com:

>domalias.exe --info

example.com

or

>domalias.exe --i example.com

--on <alias

name> Enables a domain alias

To enable domain alias example.com:

>domalias.exe --on example.com

--off <alias

name>

Disables a domain alias

To disable domain alias example.com:

>domalias.exe --off example.com

--rename <alias

name>

Renames a domain alias.

Requires the use of

the -new-name

option.

To change the name of domain alias example.com to example.org:

>domalias.exe --rename

example.com -new-name

example.org

--help or

–h

<alias

name>

Displays help on

the use of the utility

To view help on the use of this utility:

>domalias.exe –help

or

>domalias.exe -h

Options

Option Parameter Description Example

-new-

name

<FQDN> Sets a new name for an existing

domain alias

Required with the --rename

command.

To change the name of domain alias example.com to example.org:

>domalias.exe --rename

example.com -new-name

example.org

-mail true|false Enables or disables mail service on the

domain alias

To enable mail service on domain alias example.com:

>domalias.exe -u example.com -

mail true

-web true|false Enables or disables web service on the

domain alias

To enable Web service on domain alias

example.com:

>domalias.exe -u example.com -

web true

Page 79: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 79

Option Parameter Description Example

-domain <FQDN> Specifies the name of the domain for which domain alias

is to be created.

Required with the --create

command.

To create a new domain alias example.com for domain example.net

>domalias.exe --create

example.com -domain example.net

-status enabled|disa

bled|

admin,domadm

,

parent,clien

t

Enables or disables domain alias

(enabled|disabled)

or sets the status to that of the corresponding parent domain, administrator's account, domain administrator's account, or client

account.

To enable domain alias example.com:

>domalias.exe -u example.com -

status enabled

To set the status of domain alias example.com to that of the corresponding

parent domain:

>domalias.exe -u example.com -

status parent

Page 80: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 80

Domain Limits and Preferences: domain_pref.exe

The domain_pref.exe utility serves to set up domain limits and preferences. The utility allows the following:

setting up limits on domain resources usage, like the maximum number of mailboxes, databases, autoresponders, etc.

managing domain-level preferences, like web users scripting support, webmail use, etc.

Syntax

domain_pref.exe <command> [<domain_name>] [

<option1><param> [<option2><param>]…[<option N><param>]

]

Example

The following command modifies preferences of domain1.com as follows: the maximum allowed disk space for this domain is restricted to 1 Gbyte, the domain is accessible at the domain's URL with “www” prefix, the maximum number of MySQL databases used on this domain is set to 4, the maximum number of mail groups used on this domain is set to 15, and the maximum number of mail boxes allowed for this domain is set to 50.

>domain_pref.exe --update domain1.com -disk_space 1024 -www true -

max_db 4 -max_mg 15 -max_box 50

Commands

Command Parameter Description Example

--update or -

u <domain_name> Sets the

domain

preferences.

To change preferences of sampledomain.com:

>domain_pref.exe --update

domain1.com -disk_space

1024 -max_traffic 500

or

>domain_pref.exe -u

domain1.com -disk_space

1024 -max_traffic 500

Page 81: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 81

Command Parameter Description Example

--info or -i <domain_name> Retrieves information about domain

preferences.

To retrieve information about somedomain.com preferences:

>domain_pref.exe --info

somedomain.com

or

>domain_pref.exe –i

somedomain.com

--help or -h Displays help on the utility

use.

>domain_pref.exe --help

or

>domain_pref.exe -h

Options

Option Parameter Description Example

-

max_dom_

aliases

<number> Restricts the maximum number of available domain aliases.

-1 means unlimited.

To allow sampledomain.com to have maximum 2 aliases:

>domain_pref.exe --update

sampledomain.com -

max_dom_aliases 2

-

disk_spa

ce

<Mbytes> Restricts the maximum amount of available disk space.

-1 means unlimited.

To allow sampledomain.com to occupy maximum 1 Gbyte:

>domain_pref.exe --update

sampledomain.com -

disk_space 1024

-

max_traf

fic

<Mbytes> Restricts the maximum monthly traffic usage.

-1 means unlimited.

To allow sampledomain.com to use up to 10 Gbytes per month:

>domain_pref.exe --update

sampledomain.com -

disk_space 10240

-max_box <number> Restricts the maximum number of mail boxes.

-1 means unlimited.

To restrict the number of mailboxes for sampledomain.com

to 5:

>domain_pref.exe -u

sampledomain.com -max_box

5

-

mbox_quo

ta

<number> Restricts the maximum amount of disk space allotted to a single mail box on a domain (in

KB).

-1 means unlimited.

To restrict the use of disk space for a single mailbox on

sampledomain.com to 20 Mbytes:

>domain_pref.exe -u

sampledomain.com -

mbox_quota 20480

Page 82: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 82

Option Parameter Description Example

-

total_mb

oxes_quo

ta

<number> Limits the amount of disk space that all mailboxes on the

domain can occupy (in Mbytes).

If set to -1, means unlimited.

Not available if the mail server software used with Plesk does not support handling

cumulative mailbox quota.

To restrict the use of disk space for all mailboxes on

sampledomain.com to 20 Gbytes:

>domain_pref.exe -u

sampledomain.com -

total_mboxes_quota 20480

-

max_redi

r

<number> Restricts the maximum number of available mail redirects.

-1 means unlimited.

To restrict the number of mail redirects on sampledomain.com

to 5:

>domain_pref.exe -u

sampledomain.com -

max_redir 5

-max_mg <number> Restricts the maximum number of available mail groups.

-1 means unlimited.

To restrict the number of mail groups on sampledomain.com to

7:

>domain_pref.exe -u

sampledomain.com -max_mg

7

-

max_resp <number> Restricts the maximum number

of mail autoresponders (mail replies being sent

automatically).

-1 means unlimited.

To restrict the number of mail autoresponders on

sampledomain.com to 10:

>domain_pref.exe -u

sampledomain.com -

max_resp 10

-max_wu <number> Restricts the maximum number of web users.

-1 means unlimited.

To restrict the number of web users on sampledomain.com to

50:

>domain_pref.exe -u

sampledomain.com -max_wu

50

-max_db <number> Restricts the maximum number of MySQL databases that can

be used by a domain.

-1 means unlimited.

To restrict the number of MySQL databases on sampledomain.com

to 5:

>domain_pref.exe -u

sampledomain.com -max_db

5

-

max_mssq

l_db

<number> Restricts the maximum number of Microsoft SQL databases

that can be used by a domain.

-1 means unlimited.

To restrict the number of Microsoft SQL databases on

sampledomain.com to 7:

>domain_pref.exe -u

sampledomain.com -

max_mssql_db 7

-

mysql_db

ase_spac

e

<Mbytes> Restricts the maximum amount of disk space allotted to MySQL

databases (in MB).

-1 means unlimited.

To restrict the disk space occupied by all MySQL databases of sampledomain.com

to 500 Mbytes:

>domain_pref.exe -u

sampledomain.com -

mysql_dbase_space 500

Page 83: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 83

Option Parameter Description Example

-

mssql_db

ase_spac

e

<Mbytes> Restricts the maximum amount of disk space allotted to Microsoft SQL Server

databases (in MB).

-1 means unlimited.

To restrict the disk space occupied by Microsoft SQL Server databases of sampledomain.com to 700

Mbytes:

>domain_pref.exe -u

sampledomain.com -

mssql_dbase_space 700

-

max_mail

lists

<number> Restricts the maximum number of mailing lists.

-1 means unlimited.

To restrict the number of mailing lists on sampledomain.com to 3:

>domain_pref.exe -u

sampledomain.com -

max_maillists 3

-

max_weba

pps

<number> Restricts the maximum number of web applications.

-1 means unlimited.

To restrict the number of web applications on

sampledomain.com to 10:

>domain_pref.exe --update

sampledomain.com -

max_webapps 10

-

max_subd

om

<number> Restricts the maximum number of subdomains.

-1 means unlimited.

To restrict the number of subdomains on

sampledomain.com to 2:

>domain_pref.exe --update

sampledomain.com -

max_subdom 2

-

max_shar

ed_ssl_l

inks

<number> Restricts the number of shared

SSL links.

-1 means unlimited.

To restrict the number of shared SSL links for sampledomain.com to 3:

>domain_pref.exe -u -

max_shared_ssl_links 3

-

expirati

on

<YYYY-MM-

DD> Defines the date when a domain account expires.

-1 means unlimited.

To set April 1, 2009 as the expiration date for

sampledomain.com:

>domain_pref.exe --update

sampledomain.com -

expiration 2009-04-01

-www true|fals

e Allows accessing a domain

using URL with the www prefix.

Default value is true.

To make sampledomain.com

accessible with the "www" prefix:

>domain_pref.exe --update

sampledomain.com -www

true

-

wuscript

s

true|fals

e Enables/Disables using scripts for web users.

To enable scripting support for web users of sampledomain.com:

>domain_pref.exe -u

sampledomain.com -

wuscripts true

Page 84: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 84

Option Parameter Description Example

-webmail true|false

Enables/Disables using Web mail.

To enable Web mail on sampledomain.com:

>domain_pref.exe --update

sampledomain.com -webmail

true

-

max_fpse

_users

<number> Limits the maximum number of additional Microsoft FrontPage accounts that can be created

on a domain.

-1 means unlimited.

Available since Plesk 7.6.

To allow unlimited number of additional Microsoft FrontPage accounts limit on

sampledomain.com:

>domain_pref.exe -u

sampledomain.com -

max_fpse_users -1

-

max_subf

tp_users

<number> Limits the maximum number of additional FTP accounts.

-1 means unlimited.

Available since Plesk 7.6.

To allow maximum 100 additional FTP accounts on

sampledomain.com:

>domain_pref.exe -u

sampledomain.com -

max_subftp_users 100

-no_usr [bounce:

<txt>] |

[<email>]

Sets the „bounce‟ or „catch-all‟ processing mode for the incoming email addressed to a mail user that does not exist on

a domain.

The option is obsolete.

To set the „bounce‟ mode for the mail received for a non-existing

user on sampledomain.com:

>domain_pref.exe --update

sampledomain.com -no_usr

bounce:spam

To redirect all mail received for a non-existing users on sampledomain.com to

[email protected]:

>domain_pref.exe -u

sampledomain.com -no_usr

[email protected]

-

keep_tra

f_stat

<number> Defines the number of months during which the system keeps

traffic usage statistics.

0 means keeping the statistics

during unlimited period.

To make the system retain sampledomain.com traffic

statistics during 5 months:

>domain_pref.exe --update

sampledomain.com -

keep_traf_stat 5

Page 85: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 85

Domain Templates: domain_template.exe

The domain_template.exe utility serves to set and edit domain template preferences and limits. The utility allows the following operations:

creating, renaming, and deleting domain templates

setting up domain template limits and preferences

setting up various domain template hosting parameters like scripting languages support, log settings, hard disk limits, etc.

Note: This utility is available since Plesk 8.1.

Syntax

domain_template.exe <command> [<domain template_name>] [

<option1><param> [<option2><param>]…[<option N><param>]

]

Example

The following command changes the properties of domain template DomainTemplate: specifies that e-mail messages addressed to non-existing users are forwarded to e-mail address [email protected], sets the monthly domain traffic limit to 500 MB/month, enable Python and ASP.NET v. 1.1 support.

>domain_template.exe --update DomainTemplate -no_usr [email protected]

-max_traffic 500 -python true -asp.net true

Commands

Command Parameter Description Example

--create or -c

<template_name> Creates a new domain

template.

To create a domain template named

DomainTemplate:

>domain_template.exe --create

DomainTemplate

or

>domain_template.exe -c

DomainTemplate

--update or -u

<template_name> Updates an existing domain

template.

To update a domain template named DomainTemplate:

>domain_template.exe --update

DomainTemplate

or

>domain_template.exe -u

DomainTemplate

Page 86: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 86

Command Parameter Description Example

--remove or -r

<template_name> Deletes a domain

template.

To remove a domain template DomainTemplate:

>domain_template.exe --remove

DomainTemplate

or

>domain_template.exe -r

DomainTemplate

--info or -i <template_name> Displays information about a domain

template.

To display information about domain template DomainTemplate:

>domain_template.exe --info

DomainTemplate

or

>domain_template.exe -i

DomainTemplate

--help or -h Displays help on the use of

the utility.

To view help on the use of the utility:

>domain_template.exe --help

or

>domain_template.exe -h

Options

Option Parameter Description Example

-new-name <string> Sets a new name for an existing client

template.

To change the name of domain template DomainTemplate to

NewDomainTemplate:

>domain_template.exe -u

DomainTemplate -new-name

NewDomainTemplate

-clogin <client

login

name>

Assigns a domain template to a client

account

To assign domain template DomainTemplate to a client with

Plesk login name Client:

>domain_template.exe -u

DomainTemplate -clogin

Client

-no_usr bounce:<tx

t>|email|

discard

Sets the mode of automatic action toward e-mail messages addressed to non-existent users (the Mail to nonexisting user parameter): Bounce, Catch to

address, or Discard.

To have messages addressed to non-existent users bounced back with text No such mailbox on the

server:

>domain_template.exe -u

DomainTemplate -no_usr

bounce:"No such mailbox on

the server"

To have messages addressed to non-existent users forwarded to e-

mail address [email protected]:

>domain_template.exe -u

DomainTemplate -no_usr

[email protected]

Page 87: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 87

Option Parameter Description Example

-webmail true|false Sets the WebMail option

To select the WebMail option in domain template DomainTemplate:

>domain_template.exe -u

DomainTemplate -webmail

true

-

max_dom_alia

ses

<number> Sets the Maximum number of domain

aliases limit. (type "-1"

to set the parameter to Unlimited).

To set the Maximum number of domain aliases limit in domain template DomainTemplate to

unlimited:

>domain_template.exe -u

DomainTemplate -

max_dom_aliases -1

-disk_space <number> Sets the Disk space limit (in MB). (type "-1"

to set the parameter to Unlimited).

To set the Disk space limit in domain template DomainTemplate

to 50 MB:

>domain_template.exe -u

DomainTemplate -disk_space

50

-max_traffic <number> Sets the Maximum amount of traffic limit

(in MB/month). (type "-

1" to set the parameter

to Unlimited).

To set the Maximum amount of traffic limit in domain template

DomainTemplate to 500 MB/month:

>domain_template.exe -u

DomainTemplate -

max_traffic 500

-max_box <number> Sets the Maximum number of mailboxes

limit. (type "-1" to set

the parameter to

Unlimited).

To set the Maximum number of mailboxes limit in domain template

DomainTemplate to 50:

>domain_template.exe -u

DomainTemplate -max_box 50

-mbox_quota <number> Sets the Mailbox quota limit (in KB). (type "-1"

to set the parameter to

Unlimited).

To set the Mailbox quota limit in domain template DomainTemplate

to 50 KB:

>domain_template.exe -u

DomainTemplate -mbox_quota

50

-

total_mboxes

_quota

<number> Sets the Total mailboxes quota limit

(in MB). (type "-1" to

set the parameter to

Unlimited).

To set the Total mailboxes quota limit in domain template

DomainTemplate to 50 MB:

>domain_template.exe -u

DomainTemplate -

total_mboxes_quota 50

-max_redir <number> Sets the Maximum number of mail

redirects limit. (type "-

1" to set the parameter

to Unlimited).

To set the Maximum number of mail redirects limit in domain template

DomainTemplate to unlimited:

>domain_template.exe -u

DomainTemplate -max_redir

-1

-max_mg <number> Sets the Maximum number of mail groups

limit. (type "-1" to set

the parameter to

Unlimited).

To set the Maximum number of mail groups limit in domain template

DomainTemplate to 100:

>domain_template.exe -u

DomainTemplate -max_mg 100

Page 88: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 88

Option Parameter Description Example

-max_resp <number> Sets the Maximum number of mail autoresponders limit.

(type "-1" to set the

parameter to

Unlimited).

To set the Maximum number of mail autoresponders limit in domain template DomainTemplate to

unlimited:

>domain_template.exe -u

DomainTemplate -max_resp -

1

-max_wu <number> Sets the Maximum number of web users

limit. (type "-1" to set

the parameter to

Unlimited).

To set the Maximum number of web users limit in domain template

DomainTemplate to 100:

>domain_template.exe -u

DomainTemplate -max_wu 100

-

max_fpse_use

rs

<number> Sets the Maximum number of Microsoft additional FrontPage

accounts limit. (type "-

1" to set the parameter

to Unlimited).

To set the Maximum number of Microsoft additional FrontPage accounts limit in domain template

DomainTemplate to Unlimited:

>domain_template.exe -u

DomainTemplate -

max_fpse_users -1

-

max_subftp_u

sers

<number> Sets the Maximum number of additional FTP accounts limit.

(type "-1" to set the

parameter to

Unlimited).

To set the Maximum number of additional FTP accounts limit in domain template DomainTemplate

to 100:

>domain_template.exe -u

DomainTemplate -

max_subftp_users 100

-max_db <number> Sets the Maximum number of MySQL databases limit. (type

"-1" to set the

parameter to

Unlimited).

To set the Maximum number of MySQL databases limit in domain template DomainTemplate to

Unlimited:

>domain_template.exe -u

DomainTemplate -max_db -1

-

max_mssql_db

<number> Sets the Maximum number of Microsoft SQL Server databases

limit. (type "-1" to set

the parameter to

Unlimited).

To set the Maximum number of Microsoft SQL Server databases limit in domain template

DomainTemplate to 100:

>domain_template.exe -u

DomainTemplate -

max_mssql_db 100

-

mysql_dbase_

space

<number> Sets the MySQL databases quota limit (in MB, the maximum disc space allowed for MySQL databases).

(type "-1" to set the

parameter to Unlimited).

To set the MySQL databases quota limit in domain template

DomainTemplate to unlimited:

>domain_template.exe -u

DomainTemplate -

mysql_dbase_space -1

Page 89: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 89

Option Parameter Description Example

-

mssql_dbase_

space

<number> Sets the Microsoft SQL databases quota limit (in MB, the maximum disc space allowed for Microsoft SQL

databases). (type "-1"

to set the parameter to

Unlimited).

To set the Microsoft SQL databases quota limit in domain template

DomainTemplate to 100 MB:

>domain_template.exe -u

DomainTemplate -

mssql_dbase_space 100

-

max_maillist

s

<number> Sets the Maximum number of mailing lists

limit. (type "-1" to set

the parameter to

Unlimited).

To set the Maximum number of mailing lists limit in domain template

DomainTemplate to unlimited:

>domain_template.exe -u

DomainTemplate -

max_maillists -1

-max_webapps <number> Sets the Maximum number of Tomcat applications limit. (type

"-1" to set the

parameter to

Unlimited).

To set the Maximum number of Tomcat applications limit in domain

template DomainTemplate to 100:

>domain_template.exe -u

DomainTemplate -

max_webapps 100

-max_subdom <number> Sets the Maximum number of subdomains

limit. (type "-1" to set

the parameter to

Unlimited).

To set the Maximum number of subdomains limit in domain template DomainTemplate to

unlimited:

>domain_template.exe -u

DomainTemplate -max_subdom

-1

-

max_shared_s

sl_links

<number> Sets the Maximum number of shared SSL

links limit. (type "-1" to

set the parameter to

Unlimited).

To set the Maximum number of shared SSL links limit in domain template DomainTemplate to

unlimited:

>domain_template.exe -u

DomainTemplate -

max_shared_ssl_links -1

-max_odbc <number> Sets the Maximum number of ODBC connections limit. (type "-1" to set the

parameter to

Unlimited).

To set the Maximum number of ODBC connections limit in domain template DomainTemplate to Unlimited:

>domain_template.exe -u

DomainTemplate -max_odbc -

1

Page 90: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 90

Option Parameter Description Example

-expiration <number><Y

|M|D>

Sets the Validity period limit starting from creation date of a the domain account. (type

"-1" to set the

parameter to

Unlimited).

To set the Validity period limit in domain template DomainTemplate

to 20 days:

>domain_template.exe -u

DomainTemplate -expiration

20D

To set the Validity period limit in domain template DomainTemplate

to 1 year:

>domain_template.exe -u

DomainTemplate -expiration

1Y

-log_rotate true|false Enables or disables log rotation on a domain. Is

set to false by

default.

To disable log rotation in domain template DomainTemplate:

>domain_template.exe -u

DomainTemplate -log_rotate

false

-log_bysize <KB> Enables or disables log rotation once a current log file reaches certain

size.

To enable log rotation in DomainTemplate once a log file

size reaches 20 KB:

>domain_template.exe -u

DomainTemplate -log_bysize

20

-log_bytime daily|week

ly|

monthly

Enables log on a timely basis. Is set to daily

by default.

To set daily log rotation in domain template DomainTemplate:

>domain_template.exe -u

DomainTemplate -log_bytime

daily

-log_max_num <number> Sets the Maximum number of log files

parameter.

To set the maximum number of log files to 5 in domain template

DomainTemplate:

>domain_template.exe -u

DomainTemplate -

log_max_num 5

-

log_compress

true|false Sets the Compress log files parameter. Is set

to false by default.

To disable log file compression in domain template DomainTemplate:

>domain_template.exe -u

DomainTemplate -

log_compress false

-log_email <e-mail

address>

Sets the Send processed log files to

e-mail parameter.

To enable sending the log files to [email protected]:

>domain_template.exe -u

DomainTemplate -log_email

[email protected]

Page 91: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 91

Option Parameter Description Example

-

keep_traf_st

at

<number> Sets the Retain traffic statistics parameter. Is

set to false by

default. Type "0" for all

statistics retained on

domain).

To set the Retain traffic statistics parameter to 5 months:

>domain_template.exe -u

DomainTemplate -

keep_traf_stat 5

-maillist true|false Sets the Mailing lists parameter. Is set to

false by default.

To enable mailing lists in domain template DomainTemplate:

>domain_template.exe -u

DomainTemplate -maillist

true

-

dns_zone_typ

e

master|sla

ve

Sets the Type of domain DNS zone parameter. Is set to

master by default.

To set the Plesk DNS server to act as slave DNS server in domain template DomainTemplate:

>domain_template.exe -u

DomainTemplate -

dns_zone_type slave

-hosting true|false Sets the Physical hosting parameter. Is

set to false by

default.

To enable physical hosting in domain template DomainTemplate:

>domain_template.exe -u

DomainTemplate -hosting

true

-quota <MB> Sets the Hard disk quota parameter (in MB). Type "0" to set

the parameter to

Unlimited.

To set the 100 MB hard disk quota in domain template DomainTemplate:

>domain_template.exe -u

DomainTemplate -quota 100

-sb_publish true|false Sets the Publish site with SiteBuilder option.

Is set to false by

default.

To select the Publish site with SiteBuilder option in domain

template DomainTemplate:

>domain_template.exe -u

DomainTemplate -sb_publish

true

-

sb_subdomain

s_create

true|false Sets the Create Blog and Photo Gallery

subdomains parameter.

Set to false by

default.

To enable creation and publishing of the blog and photo subdomains in domain template

DomainTemplate:

>domain_template.exe -u

DomainTemplate -

sb_subdomains_create true

-ssl true|false Sets the SSL support parameter. Is set to

false by default.

To enable SSL support in domain template DomainTemplate:

>domain_template.exe -u

DomainTemplate -ssl true

-fp true|false Sets the Microsoft FrontPage support parameter. Is set to

false by default.

To enable FrontPage support in domain template DomainTemplate:

>domain_template.exe -u

DomainTemplate -fp true

Page 92: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 92

Option Parameter Description Example

-fp_ssl true|false Sets the Microsoft FrontPage over SSL support parameter. Is

set to false by

default.

To enable FrontPage Over SSL support in domain template

DomainTemplate:

>domain_template.exe -u

DomainTemplate -fp_ssl

true

-fp_auth true|false Sets the Remote Microsoft FrontPage authoring parameter. Is

set to false by

default.

To enable remote FrontPage authoring in domain template

DomainTemplate:

>domain_template.exe -u

DomainTemplate -fpauth

true

-ssi true|false Sets the SSI support parameter. Is set to

false by default.

To enable SSI support in domain template DomainTemplate:

>domain_template.exe -u

DomainTemplate -ssi true

-ssi_html true|false Sets the use SSI for *.htm, *.html files option for the SSI support parameter. Is set to

false by default.

To enable SSI support for HTML and HTM files in domain template

DomainTemplate:

>domain_template.exe -u

DomainTemplate -ssi_html

true

-php true|false Sets the PHP support parameter. Is set to

false by default.

To enable PHP support in domain

template DomainTemplate:

>domain_template.exe -u

DomainTemplate -php true

-php_version 4|5 Sets the Version option for the PHP support

parameter. Is set to 4

by default.

To select PHP5 support in domain template DomainTemplate:

>domain_template.exe -u

DomainTemplate -

php_version 5

-php_isapi true|false Sets the run as ISAPI extension option for the PHP support parameter. Is set to

false by default.

To enable running PHP as an ISAPI extension in domain template

DomainTemplate:

>domain_template.exe -u

DomainTemplate -php-isapi

true

-cgi true|false Sets the CGI support parameter. Is set to

false by default.

To enable CGI support in domain template DomainTemplate:

>domain_template.exe -u

DomainTemplate -cgi true

-perl true|false Sets the Perl support parameter. Is set to

false by default.

To enable Perl support in domain template DomainTemplate:

>domain_template.exe -u

DomainTemplate -perl true

-asp true|false Sets the ASP support parameter. Is set to

false by default.

To enable ASP support in domain template DomainTemplate:

>domain_template.exe -u

DomainTemplate -asp true

Page 93: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 93

Option Parameter Description Example

-asp.net true|false Sets the ASP.NET support parameter. Is

set to false by

default.

To enable ASP.NET support in domain template DomainTemplate:

>domain_template.exe -u

DomainTemplate -asp.net

true

-

asp.net_vers

ion

1.1|2.0 Sets the Version option for the ASP.NET support parameter. Is

set to 1.1 by default.

To enable ASP.NET v. 2.0 support in domain template

DomainTemplate:

>domain_template.exe -u

DomainTemplate -

asp.net_version 2.0

-python true|false Sets the Python support parameter. Is

set to false by

default.

To enable Python support in domain template DomainTemplate:

>domain_template.exe -u

DomainTemplate -python

true

-coldfusion true|false Sets the Coldfusion support parameter. Is

set to false by

default.

To enable ColdFusion support in domain template DomainTemplate:

>domain_template.exe -u

DomainTemplate -coldfusion

true

-webstat none|webal

izer|

awstats|sm

arterstats

|urchin

Sets the Web statistics parameter. Is set to

none by default.

To set the Webalizer support in domain template DomainTemplate:

domain.exe -u

DomainTemplate -webstat

webalizer

-

webstat_prot

dir

true|false Sets the accessible via password protected directory '/plesk-stat/' option for the Web statistics parameter. Is

set to false by

default.

To enable remote user access to the Web statistics data at http://example.com/plesk-stat/ in

domain template DomainTemplate:

>domain_template.exe -u

DomainTemplate -

webstat_protdir true

-err_docs true|false Sets the Custom Error Documents parameter.

Is set to false by

default.

To enable custom IIS server error messages in domain template

DomainTemplate:

>domain_template.exe -u

DomainTemplate -err_docs

true

Page 94: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 94

Option Parameter Description Example

-

write_modify true|false Allows/Prohibits

granting to the Plesk IIS User the Full access permission for the domain

httpdocs/ and

httpsdocs/ files and

subfolders (may be required for web applications correct functioning, but is

insecure).

Set to false by

default.

Available since Plesk 8.1.1.

To allow Plesk IIS User write and modify files and subfolders in

httpdocs/ and httpsdocs/

domain folders in domain template DomainTemplate:

>domain_template.exe -u

DomainTemplate -

write_modify true

-

iis_app_pool

true|false Sets the Use dedicated pool parameter. Is set

to false by default.

To enable use of a dedicated IIS application pool in domain template

DomainTemplate:

>domain_template.exe -u

DomainTemplate -

iis_app_pool true

-cpu_usage <number> Sets the Maximum CPU use (%)

parameter.

To limit the maximum CPU usage in domain template DomainTemplate

to 3% of the total CPU capacity:

>domain_template.exe -u

DomainTemplate -cpu_usage

3

-bandwidth <KB/S> Sets the Maximum network use (KB/S)

parameter. Type "-1"

to set the parameter to

Unlimited.

To limit the maximum network use in domain template

DomainTemplate to 100 KB/S:

>domain_template.exe -u

DomainTemplate -bandwidth

100

-

max_connecti

ons

<number> Sets the Connections limited to parameter.

Type "-1" to set the

parameter to Unlimited.

To limit the number of simultaneous connections to domain in domain

template DomainTemplate to 100:

>domain_template.exe -u

DomainTemplate -

max_connections 100

Page 95: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 95

Hosted Objects Security: HostingSecurity.exe

To host different objects, particularly, domains, subdomains and web users, which we call hosted objects, Plesk performs in Windows the following two operations for every object:

creates the object's root directory with the hosted content organized into files and folders; all located in %plesk_vhosts%

E.g., for a domain with physical hosting, the root directory is %plesk_vhosts%\<domain_name> containing folders and files defined by a

virtual host skeleton (default are /anon-ftp, /error-docs, /httpdocs, etc.)

creates Windows user accounts mapped to Plesk object-specific users

E.g., for a domain with physical hosting three Windows users are created: Plesk Domain User (<COMPUTER-NAME>/<FTP/Microsoft FrontPage Login>), Plesk IIS User (<COMPUTER-NAME>/<IUSR_FTP/Microsoft FrontPage Login>) and ftp_subaccounts (<COMPUTER-NAME>\ftp_subaccounts)

For proper functioning of the Plesk hosted objects, such Windows users must have particular permissions on accessing objects' folders and files. This is provided using security metadata files based on security templates the following way: Each hosted object in Plesk is accompanied with a specific security metadata describing what users should have which access to which file or folder of this hosted object. Plesk creates a particular object security metadata basing on a security template file which contains pattern entries describing access rights.

Plesk provides the following default security templates, all located in

%plesk_bin%\etc\:

hosting_template.xml - pattern security entries for domains with physical hosting

frame_forwarding_template.xml - domains with frame forwarding

subdomain_template.xml - subdomains

webuser_template.xml - web users

hosting_write_template.xml, subdomain_write_template.xml,

webuser_write_template.xml - additional set of pattern entries used when the

Additional write/modify permissions option is enabled on domains with physical hosting, subdomains, or web users, correspondingly

The number of security templates can be extended as desired, what is important is that they must be of a proper format.

When a hosted object is created in Plesk, Plesk creates in Windows folders, files and

users of the hosted object, then calls the HostingSecurity.exe utility which a)

creates the object's security file - an XML file .Security in the object's root folder, b) writes to this file the object's security metadata - security rules from the required default template (listed above) using this object's users, c) applies these rules to Windows security settings of the object's folders and files.

Page 96: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 96

The HostingSecurity.exe utility serves to manage Plesk hosted objects security templates and security metadata together with Windows security settings. The utility allows performing the following operations:

Generating (restoring) default Plesk security templates for hosted objects

Creating (restoring) security metadata for hosted objects

Updating security metadata by adding or removing rules from a particular template, and applying the updated security rules to Windows security settings

Note: The utility is available since Plesk 8.2.

Syntax

HostingSecurity.exe <command> [

<option1>=<param1>

[<option2>=<param2>

[<option3>=<param3>]]

]

Example

The following command removes access entries specified in the custom template ftp-

subaccounts.xml located at %plesk_dir%\etc\ from security metadata and settings of

photo.example.com:

>HostingSecurity.exe --update-subdomain-security --vhost-

name=example.com --subdomain-name=photo --remove-

template=%plesk_dir%\ftp-subaccounts.xml

Commands

Command Parameter Description Example

--create-

domain-

template

Creates a default domain security template.

Unless file location and name are specified with the --

file-name option, it is

created in the current

directory (%plesk_bin%)

under the name

hosting_template.xml.

To restore missing default domain security template

hosting_template.xml at

%plesk_dir%\etc\ directory:

>HostingSecurity.exe --

create-domain-template --

file-

name=%plesk_dir%\etc\hosti

ng_template.xml

Page 97: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 97

Command Parameter Description Example

--create-

frame-

forwarding

-template

Creates a default frame forwarding domain security

template.

Unless file location and name

are specified with the --

file-name option, it is

created in the current directory (%plesk_bin%)

under the name frame_forwarding_templ

ate.xml.

To create a default frame forwarding domain security template with default name in the

current location:

>HostingSecurity.exe --

create-frame-forwarding-

template

--create-

subdomain-

template

Creates a default subdomain security template.

Unless file location and name are specified with the --

file-name option, it is

created in the current

directory (%plesk_bin%)

under the name

subdomain_template.xml

To restore missing default subdomain security template

subdomain_template.xml at

%plesk_dir%\etc\ directory:

>HostingSecurity.exe --

create-subdomain-template

--file-

name=%plesk_dir%\etc\subdo

main_template.xml

--create-

webuser-

template

Creates a default web user's security template.

Unless file location and name are specified with the --

file-name option, it is

created in the current

directory (%plesk_bin%)

under the name

webuser_template.xml.

To create a default web user security template under the name

web-user-template.xml in the

D:\temp\ directory:

>HostingSecurity.exe --

create-webuser-template --

file-name=D:\temp\web-

user-template.xml

--create-

domain-

security

Creates domain security

metadata from a template.

Requires the --vhost-name

option.

If the --file-name option is

not specified, a default template %plesk_dir%\etc\hostin

g_template.xml is used.

To create a security metadata file for the domain example.com basing it on the template hosting_template3.xml

located at the D:\security-

templates\ folder:

>HostingSecurity.exe --

create-domain-security --

vhost-name=example.com --

file-name=D:\security-

templates\hosting_template

3.xml

Page 98: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 98

Command Parameter Description Example

--create-

frame-

forwarding

-security

Creates frame forwarding domain's security metadata

from a template.

Requires the --vhost-name

option.

If the --file-name option is

not specified, a default template %plesk_dir%etc\frame_f

orwarding_template.xml

is used.

To create a security metadata file for the frame forwarding domain sample.net basing it on the default template frame_forwarding_template.

xml located in the

%plesk_dir%\etc\ directory:

>HostingSecurity.exe --

create-frame-forwarding-

security --vhost-

name=sample.net

--create-

subdomain-

security

Creates subdomain security

metadata from a template.

Requires the --vhost-name

and --subdomain-name

options.

If the --file-name option is

not specified, a default template %plesk_dir%etc\subdoma

in_template.xml is used.

To create security metadata file for the subdomain blog.example.com basing it on a security template

blog-sub-templ.xml located at

the D:\security-templates\

folder:

>HostingSecurity.exe --

create-subdomain-security

--vhost-name=example.com -

-subdomain-name=blog --

file-name=D:\security-

templates\blog-sub-

templ.xml

--create-

webuser-

security

Creates web user's security metadata from a template.

Requires the --vhost-name

and --web-user options.

If the --file-name option is

not specified, a default template %plesk_dir%etc\webuser

_template.xml is used.

To restore a missing security metadata file for the web user example.com/~Terry basing it on a

Plesk default template webuser-

template.xml currently located in

the %plesk_bin% directory:

>HostingSecurity.exe --

create-webuser-security --

vhost-name=example.com --

web-user=Terry --file-

name=%plesk_bin%\webuser-

template.xml

--update-

domain-

security

Updates domain security metadata by applying or removing templates, and updates Windows security settings of the domain's files

and folders.

Requires the --vhost-name

option.

If no template is specified with an option --add-template

or --remove-template, a

default template %plesk_dir%\etc\hostin

g_template.xml is used.

To add access entries from the Plesk template hosting_write_template.xml

to the security metadata, and apply the security rules to Windows security settings of the domain

example.com:

>HostingSecurity.exe --

update-domain-security --

vhost-name=example.com --

add-

template=%plesk_dir%\etc\h

osting_write_template.xml

Page 99: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 99

Command Parameter Description Example

--update-

subdomain-

security

Updates subdomain security metadata by applying or removing templates, and updates Windows security settings of the subdomain's

files and folders.

Requires the --vhost-name

and --subdomain-name

options.

If no template is specified with an option --add-template

or --remove-template, a

default template %plesk_dir%\etc\subdom

ain_template.xml is used.

To remove access entries specified by the custom template ftp-

subaccounts.xml located at

%plesk_dir%\etc\ from security

metadata and settings of

photo.example.com:

>HostingSecurity.exe --

update-subdomain-security

--vhost-name=example.com -

-subdomain-name=photo --

remove-

template=%plesk_dir%\ftp-

subaccounts.xml

--update-

webuser-

security

Updates web user's security metadata by applying or removing templates, and updates Windows security settings of the web user's files

and folders.

Requires the --vhost-name

and --web-user options.

If no template is specified with an option --add-template

or --remove-template, a

default template %plesk_dir%\etc\webuse

r_template.xml is used.

To apply Plesk default security template to security metadata and Windows settings of web user

example.com/~MaryJane:

>HostingSecurity.exe --

update-webuser-security --

vhost-name=example.com --

web-user=maryJane

Options

Option Parameter Description Example

--file-

name

<fully

qualified

file

name>

Specifies the fully qualified name of a security template (absolute path to the file starting from disk

name + file name).

To create a default web user security template under the name web-user-

template.xml in the D:\Security

Templates\ directory:

>HostingSecurity.exe --

create-webuser-template --

file-name="D:\Security

Templates\web-user-

template.xml"

Page 100: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 100

Option Parameter Description Example

--vhost-

name

<domain

name> Specifies name of a domain to be affected.

Required with all commands except the --create-...-

template.

To create a security metadata file for the frame forwarding domain sample.net basing it on the default template frame_forwarding_template.xm

l located in the %plesk_dir%\etc\

directory:

>HostingSecurity.exe --

create-frame-forwarding-

security --vhost-

name=sample.net

--

subdomain-

name

<subdomai

n name> Specifies name of a subdomain to be

affected.

Required with all the --...-subdomain-

security commands.

To update security metadata and Windows settings of the subdomain blogs.sample.net using Plesk default

subdomain security template:

>HostingSecurity.exe --

update-subdomain-security --

vhost-name=sample.net --

subdomain-name=blogs

--web-user <web user

name> Specifies name of a web user to be

affected.

Required with all the --...-webuser-

security commands.

To restore a missing security metadata file for the web user example.com/~Terry basing it on a

Plesk default template :

>HostingSecurity.exe --

create-webuser-security --

vhost-name=example.com --

web-user=Terry

--add-

template <fully

qualified

file

name>

Specifies a security template containing security rules that should be added to an object's security metadata and applied to Windows security settings of the object's

files and folders.

Used only with the --update-...-

security commands.

To add additional access entries specified by the custom template extended-ftp-subaccounts.xml

located at %plesk_dir%\Security

Templates\ to the security

metadata and settings of the

example.com domain:

>HostingSecurity.exe --

update-hosting-security --

vhost-name=example.com --

add-

template="%plesk_dir%\Securi

ty Templates\extended-ftp-

subaccounts.xml"

--remove-

template <fully

qualified

file

name>

Specifies a security template containing security rules that should be removed from an object's security metadata and from Windows security settings of the object's

files and folders.

Used only with the --update-...-

security commands.

To remove access entries specified in the template hosting_write_template.xml

located in %plesk_dir%\etc\ from

security metadata and settings of

example.com:

>HostingSecurity.exe --

update-hosting-security --

vhost-name=example.com --

remove-

template=%plesk_dir%\etc\hos

ting_write_template.xml

Page 101: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 101

IP Addresses: ipmanage.exe

The ipmanage.exe utility serves to manage Plesk IP addresses. This utility allows the following:

registering IP addresses in Plesk database

removing IP addresses from Plesk database

assigning an SSL certificate to an IP

changing a network interface for an IP

viewing a list of available IP addresses, SSL certificates, and interfaces

Syntax

ipmanage.exe <command> [<IP>][

<option1><param> [<option2><param>] …[<option N><param>]

]

Example

The following command creates IP address 192.0.113.2 with a subnet mask 255.255.255.0, sets the Local Area Connection interface for it, makes this IP address exclusive (available for using by only one client), and assigns the SSL certificate called My certificate to the IP.

>ipmanage.exe --create 192.0.113.2 -mask 255.255.255.0 -interface

"\"Local Area Connection"\" -type exclusive -ssl_certificate "My

certificate"

Commands

Command Parameter Description Example

--create or -c <IP> Creates an IP address in Plesk

database.

see example above

--update or -u <IP> Changes IP address

properties.

To change IP 192.0.123.123 type to

exclusive:

>ipmanage.exe --update

192.0.123.123 -type exclusive

--remove or -r <IP> Removes an IP address from Plesk

database.

To remove IP 192.0.123.123:

>ipmanage.exe --remove

192.0.123.123

Page 102: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 102

Command Parameter Description Example

--ip_list or -l

Outputs the list of existing IP

addresses.

>ipmanage.exe --ip_list

--ssl_list or -s

Outputs the list of available SSL

certificates.

>ipmanage.exe --ssl_list

--inter_list

or -f

Outputs the list of available network

interfaces.

>ipmanage.exe --inter_list

--help or -h Outputs help on the utility use.

>ipmanage.exe --help

Options

Option Parameter Description Example

-type shared|exc

lusive Defines the IP address type: an exclusive IP can be used by only one client, a shared IP can be

used by many clients.

Required by --create.

To change IP 192.0.123.123 type to

exclusive:

>ipmanage.exe -u

192.0.123.123 -type

exclusive

-ssl_certificate <name> Specifies a name of SSL certificate to be used for

the IP.

Required by --create.

To assign a default certificate to IP 192.0.0.1:

>ipmanage.exe -u

192.0.0.1 -

ssl_certificate

"Default

Certificate"

-mask <mask> Specifies the IP subnet mask.

Used with --create

only.

Required by --create.

To create an IP with 24-bit mask:

see Example above

-interface <dev> Specifies the name of the physical network

interface.

Used with --create

only.

Required by --create.

To create an IP for the network interface "Local

Area Connection":

see Example above

-ftps true|false Allows/prohibits using FTPS, i.e., accessing FTP associated with the

IP over SSL.

Available since Plesk 8.1.1.

To allow FTPS on IP 192.0.0.1:

>ipmanage.exe -u

192.0.0.1 -ftps

true

Page 103: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 103

Notes

1. It is preferable that the name of the SSL certificate is specified as a double-quoted string. If the name of the SSL certificate contains spaces, double quotes are mandatory.

2. The name of the network interface must be specified as a double-quoted string. If the

name of the network interface contains spaces, then it must be enclosed with "\" characters. For example, the default name for the network adapter used in Windows is Local Area Connection. To specify it, use the following format:

-interface "\"Local Area Connection"\"

License Keys: keyupdate.exe

The keyupdate.exe utility updates current Plesk license key using Plesk licensing

server. The function of the keyupdate.exe utility is equivalent to the function of the

Retrieve Keys button on the License Management screen (Server > Licensing Management) in the Plesk control panel.

Syntax

keyupdate.exe

Example

The following command updates the current license key from the Plesk licensing server.

>keyupdate.exe

Page 104: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 104

Mail Accounts: mail.exe

The mail.exe utility serves to manage mail accounts. The utility allows the following operations:

creating and removing mail accounts

modifying mail account settings (mailbox quotas, antivirus protection, etc.)

managing autoresponders (email reply messages to be sent automatically), email redirection, and email aliases

enabling/disabling the email service

Syntax

mail.exe <command> [[<mail_name>@]<domain>] [

<option1><param1>[<param2>…<param n>]

[<option2><param1>[<param2>…<param n>]]

…[<option N><param>[<param2>…<param n>]]

]

Example

The following command line creates the [email protected] account, sets the

MyPass password for it, disables access to this email account via Plesk control panel, restricts the size of the email box to 200 KB, and enables bidirectional email checkup for viruses.

>mail.exe --create [email protected] -passwd MyPass -cp_access false

-mbox_quota 200 -antivirus inout

Commands

Command Parameter Description Example

--create

or -c <mail_nam

e>@<domai

n>

Creates a mail account with the

specified name.

To create an email account for John Doe on somewhere.com:

>mail.exe -create

[email protected]

or

>mail.exe -c

[email protected]

--update

or -u <mail_nam

e>@<domai

n>

Updates the mail account.

To update the size of the email box for [email protected]:

>mail.exe --update

[email protected] -mbox_quota 500

or

>mail.exe -u [email protected] -

mbox_quota 500

Page 105: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 105

Command Parameter Description Example

--remove

or -r <mail_nam

e>@<domai

n>

Removes the specified mail account from

domain.

To remove the e-mail account of John Doe from somewhere.com:

>mail.exe --remove

[email protected]

or

>mail.exe -r

[email protected]

--on <domain> Enables the email service on the

specified domain.

To enable the email service on somewhere.com:

>mail.exe --on somewhere.com

--off <domain> Disables the email service on the

specified domain.

To disable the email service on somewhere.com:

>mail.exe --off somewhere.com

--info

or -i <mail_nam

e>@<domai

n>

Retrieves info about the specified

email account.

To retrieve info about the [email protected] email account:

>mail.exe --info

[email protected]

or

>mail.exe –i

[email protected]

--help

or -h Displays help on

the use of the

utility.

To see the help info on the use of the >mail.exe utility:

>mail.exe --help

or

>mail.exe -h

Options

Option Parameter Description Example

-cp_access true|false Enables access to the email account via Plesk

Control Panel (CP).

To enable access to [email protected]

via Plesk CP:

>mail.exe --update

[email protected]

-cp_access true

-mailbox true|false Creates/removes an

email box.

To remove the John_Doe mail

box:

>mail.exe --update

John_Doe -mailbox

false

-passwd <passwd> Sets the password for an

email box.

To set the JD_password password for

[email protected]:

>mail.exe --update

John_Doe -passwd

JD_password

Page 106: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 106

Option Parameter Description Example

-boxpass <passwd> This option is the alias of the -passwd option.

The option is now

obsolete.

To set the JD_password password for

[email protected]:

>mail.exe --update

John_Doe -boxpass

JD_password

-mbox_quota <KB> Restricts the size of the email box to the

specified value (in KB).

To restrict the size of the email box for [email protected]

to 500 KB:

>mail.exe --update

[email protected]

-mbox_quota 500

-boxquota <KB> This option is the alias of the -mbox_quota

option. The option is

now obsolete.

To restrict the size of the email box for [email protected]

to 500 KB:

>mail.exe --update

[email protected]

-boxquota 500

-aliases add|del:<name

1 [,name2]> Adds or deletes email alias(es) to/from the

specified email account.

To add JD, John_D mail aliases to

[email protected]:

>mail.exe --update

[email protected]

-aliases add:JD,

John_D

-mgroups add|del:<list

1 [,list2]> Adds or removes the email account to/from

the email group.

To remove [email protected]

from the Partners email group:

>mail.exe --update

[email protected]

-mgroups del:Partners

-redirect true|false Enables/disables the email redirect option for the specified email

account.

To enable redirect of the email correspondence from [email protected]

to [email protected]:

>mail.exe --update

[email protected]

-redirect true -

rediraddr

[email protected]

-rediraddr <addr> Specifies the target email address where to redirect. Is required when enabling the email redirect option for the

email account.

To set the target address where to redirect to

[email protected]:

>mail.exe --update

[email protected]

-redirect true -

rediraddr

[email protected]

Page 107: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 107

Option Parameter Description Example

-group true|false Makes the specified email account an email

group.

To disable the email group property for

[email protected]:

>mail.exe --update

[email protected]

-group false

-groupmem add|del:<addr

1 [,addr2]> Associates/removes the specified address(-es) with/from the email

group.

To associate [email protected] with the [email protected]

email group:

>mail.exe --update

[email protected]

-groupmem add:

[email protected]

-repo add|del:<file

1 [,file2]> Adds/removes the file to/from the repository of email attachments for the specified email address. If the file is located in the folder other than %plesk_dir%admin\b

in, the fully authorized

path of the file should

be specified.

To add attach.zip located in c:\my files to the attach

repository of

[email protected]:

>mail.exe --update

[email protected]

-repo add:"c:\my

files\attach.zip"

-autorsp true|false Enables/disables all autoresponders (automatically generated email replies) for the

specified email address.

To enable all autoresponders:

>mail.exe --update

[email protected]

-autorsp true

-autoname <name> Sets the name of the autoresponder for the

specified mailname.

To set the autojohn autoresponder name for the [email protected]

mailname:

>mail.exe --update

[email protected] -

autoname autojohn

-autostatus true|false Enables/disables the autoresponder with the specified name. Is set to

true by default.

To enable the JD_autoresponder autoresponder for

[email protected]:

>mail.exe --update

John_Doe -autoname

JD_autoresponder -

autostatus true

Page 108: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 108

Option Parameter Description Example

-autoreq subj|body:<st

ring> |

always

Specifies the condition under which the autoresponder will be activated. The conditions are: the specified pattern is discovered in the email subject or body, or the autoresponder is

always active.

To reply to email messages received by [email protected] and containing Need help in the subject using

JD_autoresponder:

>mail.exe --update

John_Doe -autoname

JD_autoresponder -

autoreq subj:"Need

help"

-autosubj <original|str

ing> Specifies whether to put the original subject or a special string to the

autoresponder‟s subject.

To reply to email messages received by [email protected] using JD_autoresponder with

the Help information subject:

>mail.exe --update

John_Doe -autoname

JD_autoresponder -

autosubj "Help

information"

-

auto_replyt

o

<string> Specifies the reply to address that will be put into the autoresponder's

messages.

To set the reply to address to [email protected] for JD_autoresponder associated with

[email protected]:

>mail.exe --update

John_Doe -autoname

JD_autoresponder -

auto_replyto

[email protected]

om

-autotext <string> Specifies the message text for a certain

autoresponder.

To change the autoresponder message text to Thank you for your inquiry for JD_autoresponder associated with

[email protected]:

>mail.exe --update

John_Doe -autoname

JD_autoresponder -

autotext "Thank you

for your inquiry"

-autoatch add|del:<file

1 [,file2]> Adds/removes the autoresponder‟s attached files. If the file to attach is located in the folder other than %plesk_dir%admin\b

in, the fully authorized

path of this file should be

specified.

To add attach.zip located in

c:\my files to the

messages of JD_autoresponder associated with

[email protected]:

>mail.exe --update

John_Doe -autoname

JD_autoresponder -

autoatch add:"c:\my

files\attach.zip"

Page 109: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 109

Option Parameter Description Example

-autofrq <number> Specifies the maximal number of replies sent to a unique email address

per day.

To set sending not more than 5 replies to a unique email address per day for JD_autoresponder associated with

[email protected]:

>mail.exe --update

John_Doe -autoname

JD_autoresponder -

autofrg 5

-autostor <number> Defines the number of unique email addresses for the specified

autoresponder.

To restrict the number of unique addresses to 10 for JD_autoresponder associated with

[email protected]:

>mail.exe --update

John_Doe -autoname

JD_autoresponder -

autostor 10

-autored <addr> Specifies the email address to forward all incoming

correspondence to.

To forward all incoming mail to [email protected] for JD_autoresponder associated with

[email protected]:

>mail.exe --update

John_Doe -autoname

JD_autoresponder -

autored

[email protected]

-antivirus off | inout |

in | out

Sets up the antivirus checkup of the email traffic. One can disable this option, or enable this checkup for the incoming mail only, or for the outgoing email

only, or for both.

To enable the antivirus checkup for all email messages sent to [email protected]:

>mail.exe --update

[email protected]

-antivirus in

Page 110: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 110

Mail Server Configuration Restore: mchk.exe

The mchk.exe utility serves to restore the mail server (MS) configuration basing on the

configuration of mail system in the Plesk database. The utility allows restoring mail on the level of

domain

global mail settings

the whole mail server (domains + global settings)

Using the utility is indispensable when changing the mail server used with Plesk from one to another, or when a mail server configuration is corrupt.

Restoring Domain Mail Configuration

Restoring MS configuration on the domain level means that, if missing, the following objects are created and properties set:

domain, domain's mail aliases

mail service status, the Mail to non-existent user property

domain's mail accounts, mail account status, password, aliases, mailbox quota, redirect and mail group addresses, spam filter status

mail lists, mail list status

domain limits Mailbox Quota and Total Mailboxes Quota

If the domain-level restoring of mail is performed with the --fix=local option specified, the following additional changes are made:

if a domain exists in mail server, its mail data is reconfigured (true for SmarterMail only)

if a mail name exists on the domain, its data is reconfigures (true for MailEnable and Merak)

For your convenience, mchk.exe allows restoring a single domain, several domains, and all domains with one command (see the available options in the table below).

Restoring Global Mail Settings

Restoring global mail settings includes the following:

setting relay type, configuring relay white and black lists

enabling/disabling the following functionality if it's not supported by the mail server:

enabling mail service on all domains if disabling the service is not supported

disabling mail domain aliases

disabling mail groups in general, or mail groups on mail names with mail boxes

disabling/enabling the Mail List service on all domains and disabling/enabling all existing mail lists if the contrary is not supported

Page 111: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 111

setting up the spam filtering (none, server, user, both)

Syntax

mchk.exe [options]

Example

This command checks and restores the missing mail configuration data for all domains, and, if errors are found in the existing domain settings, reconfigures them:

>mchk.exe --all-domains --fix=local

Options

Option Parameter Description Example

--

domain --domain-

name=<domain

name>

Checks and restores mail configuration for a single domain. (See the details

above.)

To restore mail server configuration for the

example.com domain:

>mchk.exe --domain --

domain-name=example.com

--

domains --domain-

names=<dom1[

;dom2;dom3;.

..]> | --

via-file

<file>

Checks and restores mail configuration for several domains listed either right in the command line or in the plain text file specified by the

--via-file option. (See the

details above.)

To restore mail server configuration for the domains example.com, sample1.net,

sample2.net:

>mchk.exe --domains --

domain-names-

example.com;sample1.net

;sample2.net

To restore mail server configuration for the domains

listed in the file restore-

domains.txt located at C:\Program

files\SWsoft\plesk\temp

\:

>mchk.exe --domains --

via-file "C:\Program

files\SWsoft\plesk\temp

\restore-domains.txt"

--all-

domains Checks and restores mail

configuration for all domains.

(See the details above.)

>mchk.exe --all-domains

--

global-

setting

s

Checks and restores only server-wide mail settings.

(See the details above.)

>mchk.exe --global-

settings

--all Checks and restores server-wide mail settings and mail

settings for all domains.

>mchk.exe --all

Page 112: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 112

Option Parameter Description Example

--

fix=loc

al

Checks the existing mail configuration data and reconfigures the mail settings if finds something wrong. (See

the details above.)

Used with the --domain, --

domains, --all-domains,

and the --all options.

To restore the example.com domain so that its configuration in mail server, if exists, was

changed:

>mchk.exe --domain --

domain-name=example.com

--fix=local

--

fix=all Resets forcedly the mail

configuration: removes all the existing configuration data, and sets it up according to the

Plesk database.

Used only with the --all

option.

Note: It is recommended to use this option only if the mail server database is seriously corrupted.

>mchk.exe --all --

fix=all

Page 113: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 113

Mail Server Options: mailserver.exe

The mailserver.exe serves to change server-wide mail settings defining the way mail server works on all domains where the mail service is enabled.

Note: This utility is available only since Plesk 8.1.

Syntax

mailserver.exe <command> [

<option1><param> [<option2><param>] …[<option N><param>]

]

Example

The following command enables checking passwords in the dictionary while creating mail accounts.

>mailserver.exe --use-vocabulary true

Commands

Command Parameter Description Example

--use-

vocabulary true|false Enables the mail server

option Check the passwords for mailboxes in the dictionary, which turns on checking passwords in a vocabulary during creation of a mail accounts. Enabling this option provides more security to Plesk mail users in cases of vocabulary attacks on mail

accounts.

To enable checking mail account passwords in a

vocabulary:

>mailserver.exe --

use-vocabulary true

Note: When enabling checking passwords in a dictionary, be sure that Microsoft Windows Local Security Policy is set up as follows: Security settings > Account polices > Password policy: Password must meet complexity requirements is Enabled.

Page 114: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 114

Mailing Lists: maillist.exe

The maillist.exe utility serves to manage mailing lists. The utility allows the following:

creating and removing mailing lists

adding and removing mail addresses to/from mailing lists

modifying mail and notification settings of the mailing list administrator

Syntax

maillist.exe <command> [<maillist>] [

<option1><param1> [<param2>…<param n>]

[<option2><param1> [<param2>…<param n>]]

…[<option N><param1> [<param2>…<param n>]]

]

Example

The following command creates the Work mailing list on the domain1.com domain,

sets the MyPass password for the mailing list administrator, orders not to send the mailing list created notification to this administrator, and sets the [email protected] email address for this administrator.

>maillist.exe --create Work -domain domain1.com -passwd MyPass -notify

false -email [email protected]

Commands

Command Parameter Description Example

--create

or -c <maillist> Creates a mailing list

with the specified name on a certain

domain.

To create the Friends mailing list on somewhere.com:

>maillist.exe --create

Friends -domain somewhere.com

or

>maillist.exe –c Friends -

domain somewhere.com

--update

or -u <maillist> Updates mailing list

properties. To update the Partners mailing list with addresses [email protected],

[email protected]:

>maillist.exe --update

Partners -members

add:[email protected],

[email protected]

or

>maillist.exe -u Partners -

members add:[email protected],

[email protected]

Page 115: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 115

Command Parameter Description Example

--remove

or -r <maillist> Deletes the specified

mailing list. To remove the Friends mailing list from somewhere.com:

>maillist.exe --remove

Friends -domain somewhere.com

or

>maillist.exe –r Friends -

domain somewhere.com

--info

or -i <maillist> Displays the list of

members added to the specified mailing

list.

To see the list of members added to the Friends mailing list on somewhere.com:

>maillist.exe --info Friends

-domain somewhere.com

or

>maillist.exe -i Friends -

domain somewhere.com

--help

or -h Displays help on the

use of the utility. To see the help info on the use of the maillist.exe utility:

>maillist.exe –-help

or

>maillist.exe –h

Options

Option Parameter Description Example

-domain <domain_name

> Specifies the domain name. This option is required for all commands, except

on --help.

To remove the Friends mailing list from somewhere.com:

>maillist.exe --remove

Friends -domain somewhere.com

-passwd <password> Sets the mailing list administrator‟s password. Can be

used with the --

create command

only.

To set the Friends mailing list administrator‟s password:

>maillist.exe --create

Friends -domain somewhere.com

-passwd Administrator

-email <email> Sets the email address for the mailing list administrator. Can

be used with the --

create command

only.

To set the email for the Friends mailing list administrator:

>maillist.exe --create

Friends -domain somewhere.com

-email

[email protected]

Page 116: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 116

-notify true|false Notifies the mailing list administrator that the mailing list has been created OK. Is set to true by default. Can be

used with the --

create command

only.

To enable the notification option for the Friends mailing list administrator:

>maillist.exe --create

Friends -notify true

-status true|false Enables/disables the specified mailing list . Is set to true by

default.

To enable the Partners mailing list on domain on domain somwhere.com:

>maillist.exe --update

Partners -domain somwhere.com

-status false

-members add|del:<ema

il1>

[,<email2>[,

...]]

Adds/deletes email addresses to/from the specified mailing

list.

To add email addresses [email protected], [email protected] to the Partners

mailing list on domain somewhere.com:

>maillist.exe --update

Partners -members -domain

somwhere.com

add:[email protected],

[email protected]

Page 117: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 117

Protection on Site Directories: protdir.exe

The protdir.exe utility serves to manage web protection for domain directories, or, in other words, site areas. The utility allows the following operations:

creating, renaming, and removing protected web directories

adding and removing users allowed to access protected web directories

changing the credentials of the users allowed to access protected web directories

Syntax

protdir.exe <command> [<dir_name>] [

<option1><param> [<option2><param>]…[<option N><param>]

]

Example

The following command line creates the Protected_Dir protected directory on

domain domain1.com, adds the MyGuest user for this directory, and sets the MyPass password for this user.

>protdir.exe --create Protected_Dir -domain domain1.com -add_user

MyGuest -passwd MyPass

Commands

Command Parameter Description Example

--create or -

c <dir_name> Creates the

protected URL on the specified

domain.

To create the Protected_Dir protected URL on somewhere.com:

>protdir.exe --create

Protected_Dir -domain

somewhere.com

or

>protdir.exe -c Protected_Dir

-domain somewhere.com

--update or -

u <dir_name> Updates the

protected URL. Is meant to change URL and

manage its users.

To update Protected_Dir by assigning it a title to be displayed on the dialog box:

>protdir.exe --update

Protected_Dir -domain

somewhere.com -title “Sample

directory”

or

>protdir.exe –u Protected_Dir

-domain somewhere.com -title

“Sample directory”

Page 118: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 118

Command Parameter Description Example

--remove or -

r <dir_name> Deletes the

protected URL. To delete the Protected_Dir protected URL:

>protdir.exe --remove

Protected_Dir -domain

somewhere.com

or

>protdir.exe -r Protected_Dir

-domain somewhere.com

--help or -h Displays help on the use of the

utility.

To see the help info on the use of this

utility:

>protdir.exe -–help

or

>protdir.exe -h

Options

Option Parameter Description Example

-domain <domain_na

me> Specifies the domain name that owns the URL. This option is required for all commands,

except on --

help.

To create the Protected_Dir protected URL on somewhere.com:

>protdir.exe --create

Protected_Dir -domain

somewhere.com

-subdomain <subdomain

_name> Specifies the name of a

subdomain.

To create the Protected_Dir protected URL on subdomain1.somewhere.com:

>protdir.exe --create

Protected_Dir -domain

somewhere.com -subdomain

subdomain1

-title <string> Specifies the realm of the protected URL, i.e. the description that will be displayed in the authorization

window.

To create a realm for the protected

URL:

>protdir.exe --update

Protected_Dir -domain

somewhere.com -title “Sample

directory”

-passwd <password> Specifies the user password.

To set a password for the user of a protected URL:

>protdir.exe --update

Protected_Sample -domain

somewhere.com -update_user

johndoe -passwd Password1

Page 119: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 119

-add_user <login_nam

e> Adds the user with the specified

name.

To add user johndoe:

>protdir.exe --update

Protected_Dir -add_user

johndoe

-update_user <login_nam

e> Updates the user with the specified

name.

To provide the user of a protected URL with a new login name:

>protdir.exe --update

Protected_Dir -update_user

johndoe -user_name

johndoe_new

-remove_user <login_nam

e> Removes the user with the

specified name.

To remove a user of the protected URL:

>protdir.exe --update

Protected_Dir -remove_user

johndoe

-user_name <login_nam

e> Sets the login name for the user. Can be used in combination with the -update_user

option.

To provide the user of the protected

URL with a new login name:

>protdir.exe --update

Protected_Dir -update_user

johndoe -user_name

johndoe_new

-dir_name <dir_name> Sets the name of the protected URL. Can be used in combination with

the -update_user

option.

To set a new name for the protected URL:

>protdir.exe --update

Protected_Dir -dir_name

Protected_Dir_New

Page 120: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 120

Server Initial Configuration And Administrator's Personal Info: init_conf.exe

The init_conf.exe utility serves to perform the initial configuration of Plesk, and to change personal information of Plesk Administrator. The utility provides the following:

setting up host name

defining shared IP addresses

specifying Plesk administrator's personal information

creating a client account for the administrator

Syntax

init_conf.exe <command> [

<option1> [<param1>…<param n>]

[<option2> [<param1>…<param n>]]

…[<option_N> [<param1>…<param n>]]

]

Example

The following command sets IP address 192.0.2.0 as shared, sets the host name to somewhere.com and sets the administrator‟s name to Administrator and the administrator‟s password to MyPass. Finally, this command creates the default client account (named My Domains).

>init_conf.exe --init -shared_ips add:192.0.2.0 -hostname

somewhere.com -name Administrator -passwd MyPass -def_client

Commands

Command Parameter Description Example

--init Initializes Plesk Server Administrator. Can be applied to the non-configured Plesk Server

Administrator only.

--update or -

u Changes the

administrator‟s contact info. To change the administrator's email to

[email protected]:

>init_conf.exe --update

-email

[email protected]

Page 121: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 121

Command Parameter Description Example

--help or -h Displays help on the utility use.

>init_conf.exe -h

Options

Option Parameter Description Example

-shared_ips add:<ip_1>,<

ip_2>,…,<ip_

n>

Sets the IP addresses specified as the parameters

as shared.

Used with --init only.

To set 192.0.2.0 as shared IP:

>init_conf.exe --

init -shared_ips

add:192.168.1.1

-hostname <FQDN> Sets the full host name of the server.

Used with --init only.

To set the host name to somewhere.com:

>init_conf.exe --

init -hostname

somewhere.com

-company <string> Defines the administrator's

company name.

>init_conf.exe --

update -company

“Administrator's

Company”

-name <string> Specifies the Plesk administrator‟s contact name.

>init_conf.exe --

init -name “John

Doe”

-passwd <password> Specifies Plesk

administrator‟s password.

>init_conf.exe --

init -passwd

somepassword

-phone <number> Specifies the administrator's phone number.

>init_conf.exe --

update -phone

5555555

-fax <number> Specifies the administrator's

fax number.

>init_conf.exe --

update -fax 333-

3333

-email <string> Specifies the administrator‟s email address.

>init_conf.exe --

update -email

[email protected]

om

-addr <string> Specifies the administrator‟s street address.

>init_conf.exe --

update -addr

“Streetname 1”

-city <string> Specifies the city of the

administrator's address.

>init_conf.exe --

update -city “New

York”

-state <string> Specifies the state/province of the administrator's address.

>init_conf.exe --

update -state NY

-pcode <string> Specifies the zip code of the

administrator's address.

>init_conf.exe --

update -pcode

77568

Page 122: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 122

Option Parameter Description Example

-

send_announce true|false Subscribes administrator to

the SWsoft mailing list (announcements on new SWsoft products, discounts,

etc.) when set to true.

Available in Plesk 7.6 and

later.

To subscribe the administrator to the

SWsoft mailing:

>init_conf.exe --

update -

send_announce

true

-country <string> Specifies the country of the administrator's address in the format of an upper-case two-letter code derived from ISO

3166.

To change country to Australia in the administrator's contact

info:

>init_conf.exe --

update -country

AU

-def_client Creates the default „My Domains‟ client account for

the administrator.

Used with --init only.

To create the default user account:

>init_conf.exe --

init -def_client

-admin_info_no

t_required

true|false Defines whether Plesk Administrator's personal info (except for e-mail) is marked

as Required or not.

Set to false by default.

Available since Plesk 8.1.

To initialize Plesk server so that the Plesk Administrator after entering his credentials to freshly-installed Plesk got directly to Administrator's desktop skipping all 'first-login

configuration' screens:

>init_conf.exe --

init -hostname

plesk.example.com

-

admin_info_not_re

quired true

Page 123: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 123

Server Security: ApplySecurity.exe

Plesk installation creates in Windows user accounts mapped to Plesk users, such as Psaadm, Psacln, Psaserv, which should have specific access rights to various Windows server folders and files. It is important that these users are granted permissions sufficient for proper Plesk work, and at the same time their access should be reasonably restricted to provide the server's security. What user should have what access to what server objects is defined by the Plesk security rules. The rules are contained in the file %plesk_dir%\etc\DiskSecurity\DiskSecurity.xml in the form of access control entries (ACEs).

Important: Do not change the original Plesk ACEs as you won't be able to roll back your changes and restore the original rules. If you need to extend the set of security rules, we recommend to create additional .xml files in the same folder containing

the necessary additional security rules.

The ApplySecurity.exe utility serves to manage synchronization of Windows

security settings of all server folders except the %plesk_vhosts% directory with the

Plesk security rules. This is the one-direction synchronization meaning that Plesk configures Windows security settings of files and folders basing on the Plesk security rules and does not change this security rules according to the existing Windows security settings. For information on configuring security settings of the

%plesk_vhosts% directory content, refer to the Hosted Objects Security Setup: HostingSecurity.exe (on page 95) section.

The utility allows performing the following operations:

Synchronizing Windows security settings of all folders except %plesk_vhosts%

Synchronizing Windows security settings of a particular folder

Creating/Removing a scheduled task on synchronizing Windows security settings of all folders

Note: The utility is available since Plesk 8.2.

Syntax

ApplySecurity.exe <command> [<option>=<param>]

Example

The following command synchronizes Windows security settings of the directory C:\Documents and Settings\ with the Plesk security rules:

>ApplySecurity.exe --apply-to-directory --directory="C:\Documents and

Settings\"

Page 124: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 124

Commands

Command Parameter Description Example

--install Schedules a task on synchronizing Windows security settings of all server directories except %plesk_vhosts% with Plesk

security rules. Only one task can

be scheduled.

Requires the --wait option.

To make security settings of all server directories (except

%plesk_vhosts%)

synchronized with Plesk

security rules after 12 hours:

>ApplySecurity.exe --

install --wait=720

--

uninstall

Removes the scheduled security synchronization task.

>ApplySecurity.exe --

uninstall

--apply Synchronizes Windows security settings of all server directories

except %plesk_vhosts% with

Plesk security rules.

>ApplySecurity.exe --

apply

--apply-

to-

directory

Synchronizes Windows security settings of a specified directory with Plesk security rules. Only one directory's content can be

processed at a time.

Requires the --directory

option.

To synchronize security settings of the directory C:\WINDOWS\system32\

with the Plesk security rules:

>ApplySecurity.exe --

apply-to-directory --

directory="C:\WINDOWS

\system32"

--help Displays help on the utility usage. >ApplySecurity.exe --

help

Options

Option Parameter Description Example

--wait <minutes> Specifies the time (in minutes) after which security settings synchronization will be

performed.

Used only with the --

install command.

To make security settings of all server directories (except

%plesk_vhosts%) synchronized

with Plesk security rules after 6

hours:

>ApplySecurity.exe --

install --wait=360

--

directory <directory

-name>

Specifies the name of the directory which security settings should be synchronized with Plesk security rules.

Used only with the --apply-to-directory

command.

To synchronize security settings of

the directory C:\Program

files\Common\ with the Plesk

security rules:

>ApplySecurity.exe --

apply-to-directory --

directory="C:\Program

Files\Common"

Page 125: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 125

Sitebuilder Integration: sitebuilder.exe

The sitebuilder.exe utility serves to manage the basic aspects of Plesk and Sitebuilder integration, which includes the following:

migrating Sitebuilder users from earlier versions to the newer ones

updating links between Plesk and Sitebuilder when migrating to the newer versions

restoring Sitebuilder users in accordance with Plesk user accounts

Syntax

sitebuilder.exe command [options]

Example

The following command restores SiteBuilder Domain Owner account example.com and all client accounts, basing on the Plesk user accounts:

>sitebuilder.exe --fix -domain_name example.com

Commands

Command Parameter Description Example

--migrate2to3

or -m

Migrates user accounts and sites from Sitebuilder 2.0 to Sitebuilder

3.x and newer.

If the -domain_name and/or the

-client_login options are not

specified, all sites/domain owner accounts and/or client accounts

are migrated.

To migrate all users and sites from Sitebuilder 2.0

to Sitebuilder 3.2:

>sitebuilder.exe -

-migrate2to3

--update761 or -u

Updates internal links between Plesk updated from 7.6 to Plesk 8.x and Sitebuilder updated from

3.1 to 3.2 or newer.

If the -domain_name and/or the

-client_login options are not

specified, all domain owner and/or client accounts are

updated.

To update links for the client JohnDoe, and for

all domains:

>sitebuilder.exe -

u -client_login

JohnDoe

Page 126: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 126

Command Parameter Description Example

--fix or -f Restores Sitebuilder Reseller and Site Owner accounts (login name, password, email, contact name) according to the existing Plesk Client and Domain Administrator

accounts, correspondingly.

If the -domain_name and/or the

-client_login options are not

specified, all domain owner and/or client accounts are

restored.

To restore all user accounts in Sitebuilder database basing on the data from Plesk

database:

>sitebuilder.exe -

-fix

Options

Option Parameter Description Example

-domain_name or -d

<domain

name> Specifies the domain (site and domain administrator account) on which the command must be executed. Only one domain can be specified with one

command line.

Used with the --fix, --

update761, --migrate2to3

commands.

If not specified, means all.

To update links for the domain example.com, and

for all clients:

>sitebuilder.exe -u

–d example.com

-client_login

or -c

<client

login> Specifies the client account on which the command must be executed. Only one client can be specified with one

command line.

Used with the --fix, --

update761, --migrate2to3

commands.

If not specified, means all.

To update links for the client JohnDoe, and for all

domains:

>sitebuilder.exe -u

-client_login

JohnDoe

Page 127: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 127

Spam Filtering Configuration on the Mailbox Level: spamassassin.exe

The spamassassin.exe utility serves to manage spam filtering on the mail-account level. The utility allows the following operations:

enabling the use of server-wide spam filtering settings

setting the number of hits required to mark a letter as spam

adding mail addresses to black and white lists

marking mail subject as spam, deleting spam messages

Syntax

spamassassin.exe <command> [<mail_name>] [

<option1><param1> [<param2>…<param n>]

[<option2><param1> [<param2>…<param n>]]

…[<option N><param1> [<param2>…<param n>]]

]

Example

The following command line modifies the SpamAssassin configuration on [email protected] to using server-wide settings, sets the number of hits sufficient to consider a letter as spam to 6, orders to delete spam, and puts the [email protected] email address to the black list.

>spamassassin.exe --update [email protected] -server-conf true -hits

6 -action del -blacklist add:[email protected]

Commands

Command Parameter Description Example

--update or -u <mail_name> Updates the spam filter configuration for an existing

email user.

Updates spam filter settings for [email protected]:

>spamassassin.exe --

update [email protected]

-hits 3 action del -

blacklist

add:[email protected]

or

>spamassassin.exe -u

[email protected] -hits

3 action del -blacklist

add:[email protected]

Page 128: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 128

Command Parameter Description Example

--info or -i <mail_name> Retrieves the spam filter settings for the specified email

account.

To retrieve spam filter settings for [email protected]:

>spamassassin.exe --info

[email protected]

or

>spamassassin.exe -i

[email protected]

--help or -h Displays help on the use of this

utility.

To see the help info on the use of the spamassassin.exe utility:

>spamassassin.exe -–help

or

>spamassassin.exe -h

Options

Option Parameter Description Example

-server-conf true|false Applies the server- wide settings.

To use the server-wide settings:

>spamassassin.exe --

update

[email protected] -

server-conf true

-hits <float> Specifies the number of hits that are enough to consider a letter as

spam

To set the number of hits required

to mark a letter as spam to 3:

>spamassassin.exe --

update

[email protected] -

hits 3

-action del|mark Specifies the action to perform against

spam.

To delete spam:

>spamassassin.exe --

update

[email protected] -

action del

-modify-subj true|false Allows/prohibits modifying the subject of mail messages.

To allow mail subject modification and to mark the subject with the

spam word.

>spamassassin.exe -update

[email protected] -

modify-subj true -modify-

subj-text “SPAM mail”

-modify-subj-

text

<string> Modifies the text of email message‟s

subject.

-blacklist add|del:<pa

ttern1> [,

<pattern2>,

[…]]

Adds/deletes email message(s) to

/from the black list.

To add [email protected]

to the black list:

>spamassassin.exe --

update

[email protected] -

blacklist add:

[email protected]

Page 129: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 129

Option Parameter Description Example

-whitelist add|del:<pa

ttern1> [,

<pattern2>,

[…]]

Adds/deletes email message(s) to

/from the white list.

To add [email protected] to the white list:

>spamassassin.exe --

update

[email protected] -

whitelist add:

[email protected]

-enable-

filtering

true|false Enables/disables spam filtering using

SpamAssassin.

Available since Plesk 7.6.

To enable spam filtering for [email protected]:

>spamassassin.exe --

update

[email protected]

enable-filtering true

Page 130: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 130

Spam Filtering Configuration on the Server Level: spamassassin_server.exe

Starting with version 7.6.1 and later, Plesk server-wide spam check settings can be configured via CLI and forcedly applied to all mailboxes residing on this server. This utility allows the following :

applying forcedly server-wide spam check settings to all mailboxes of the server either instead of or along with personal settings enabled for each mailbox individually

setting filtering parameters like the number of hits that indicate spam, the mail size, black and white lists

marking spam messages automatically with a special text added to the message subject, or alerting user about spam with a specific alert message

Syntax

spamassassin_server.exe <command> [

<option1><param1> [<param2>…<param n>]

[<option2><param1> [<param2>…<param n>]]

…[<option N><param1> [<param2>…<param n>]]

]

Example

The following command line modifies SpamAssassin server-wide configuration so that the server-wide filtering settings are applied to all mailboxes, the number of hits is set to 5, the maximal mail size to be spam-checked is 100 Kb, and it is allowed to modify the subject of email letters by adding the SPAM mail text.

>spamassassin_server.exe –u server-conf true hits 5 -max-mail-size 100

-max-threads 5 -modify-subj true -modify-subj-text “SPAM mail”

Commands

Command Parameter Description Example

--update or

-u

Updates the server-wide spam

filter configuration.

To reconfigure number of hits for

SpamAssassin on the entire server:

>spamassassin_server.exe –-

update hits 5

or

>spamassassin_server.exe –u hits

5

Page 131: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 131

Command Parameter Description Example

--info or -

i

Retrieves server-wide spam filter

settings.

To retrieve the server-wide spam filter settings:

>spamassassin_server.exe --info

or

>spamassassin_server.exe -i

--help or -

h

Displays help on the use of this

utility.

To see the help info on the use of the spamassassin_server.exe utility:

>spamassassin_sever.exe –-help

or

>spamassassin_sever.exe –h

Options

Option Parameter Description Example

-server-conf true|false Enables/disables spam check using

server-wide settings.

To use server-wide settings for spam check:

>spamassassin_server.exe

–u server-conf true

-user-conf true|false Enables/disables spam check using

personal settings.

To allow use of personal settings for spam check:

>spamassassin_server.exe

–u user-conf true

-hits <number> Specifies the number of hits that are enough to consider a letter as spam.

To set the number of hits required to mark a letter as spam

to 5:

>spamassassin_server.exe

–u hits 5

-max-mail-

size

<KB> Specifies the maximal mail size (in Kb) for which filtering is applied. If set to -1, (or to 0 or any negative value), the mail size is

unlimited.

To set the maximal mail size subject to spam checkup to 100

Kb:

>spamassassin_server.exe

–u -max-mail-size 100

-max-threads <number> Specifies the number of threads spam filter

can create.

To restrict the number of allowed threads for SpamAssassin to 1:

>spamassassin_server.exe

–u -max-threads 1

-modify-subj true|false Allows/disallows modifying the subject

of email messages.

To allow email subject modification and to mark the

subject with the spam text:

>spamassassin_server.exe

–u -modify-subj true -

modify-subj-text

“*****SPAM*****”

-modify-subj-

text

<string> Modifies the text of email message‟s

subject.

Page 132: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 132

Option Parameter Description Example

-report-text <string> Specifies the text used to warn the user when the spam filter detects

spam.

To warn the user with Spam detected text:

>spamassassin_server.exe

–u -report-text “Spam

detected”

-blacklist add|del:<pa

ttern1> [,

<pattern2>,

[…]]

Adds/deletes email pattern(s) to /from the

black list.

To add [email protected] to the

black list:

>spamassassin_server.exe

-u -blacklist add:

[email protected]

-whitelist add|del:<pa

ttern1> [,

<pattern2>,

[…]]

Adds/deletes email pattern(s) to /from the

white list.

To add [email protected] to the white list:

>spamassassin_server.exe

-u -whitelist add:

[email protected]

Page 133: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 133

Statistics Calculation: statistics.exe

The statistics.exe utility serves to calculate statistics on system resources used by Plesk domains. The utility allows performing the following tasks:

calculating HTTP, FTP traffic and/or disk space usage statistics for all or specific domains

calculating mail traffic usage for all domains

comparing the results of calculations with domain limits and sending "limit exceeded" email notifications

comparing the results of calculations with domain limits and launching "limit reached" event actions

It is important to keep in mind that when the utility is processing a domain, it writes to the AWStats configuration file for this domain (in case that AWStats is a working web statistics application on the domain) the Plesk default values of the following fields: LogType, LogFormat, SiteDomain, HostAliases, DNSLookup, DirData, DirCgi, DirIcons, SaveDatabaseFilesWithPermissionsForEveryone, DefaultFile, LogFile, HTMLEndSection.

The domain AWStats configuration file has name awstats.<domain_name>.conf, it

is located at the %plesk_dir%Additional\AWStats\wwwroot\cgi-bin\

directory and its copy in the %plesk_vhosts%<domain_name>\statistics\webstat\AWStats\cgi-bin\

folder. Each time statistics.exe processes the domain, it overwrites the above

mentioned fields in the domain AWStats configuration file located at %plesk_dir%Additional\..., and then copies it to the

%plesk_vhosts%<domain_name>\...\ directory replacing the config that existed there before.

Syntax

statistics.exe [

<option1>=<param1>[;<param2>;…;<param n>]

[<option2>=<param1>[;<param2>;…;<param n>]]

…[<option N>=<param1>[;<param2>;…;<param n>]]

]

Example

The following command calculates FTP and HTTP traffic used by all domains containing a string example in their names (e.g., example.com, justanexample.net, etc.):

>statistics.exe --http-traffic --ftp-traffic --process-domains-

mask=%example%

Page 134: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 134

Options

Option Parameter Description Example

<none> Equal to the --all option,

see below.

>statistics.exe

--disk-

usage

Calculates the amount of disk space used by specified or all

domains.

To calculate the amount of disk space used by all domains which

names end with ample.com:

>statistics.exe --disk-

usage --process-domain-

mask=%ample.com

--http-

traffic

Calculates the amount of HTTP traffic used by specified

or all domains.

To calculate HTTP traffic for all domains matching the pattern sm_th% (smyth.com, smath.org, smuth.net, etc.) except for the domains smyths.org and

smyths.info:

>statistics.exe --http-

traffic --process-domain-

mask=sm_th% --skip-

domains=smyths.org;smyths

.info

--ftp-

traffic

Calculates the amount of FTP traffic used by specified or all

domains.

To calculate the amount of FTP traffic used by domains

example.com and sample.net:

>statistics.exe --ftp-

traffic --process-

domains=example.com;sampl

e.net;sample1.org

--mail-

traffic

Calculates the amount of mail traffic used by all domains.

>statistics.exe --mail-

traffic

--notify Calculates disk space, FTP, HTTP and mail traffic usage for all domains; Checks if domains expired and if the resources usage is within limits defined for the domains; Sends e-mail notifications about the domain expiration

and/or exceeded limits.

>statistics.exe --notify

--

update-

actions

Calculates disk space, FTP, HTTP and mail traffic usage for all domains; Checks if domains expired and if the resources usage is within limits defined for the domains; Rotates action log and launches the "limit reached"

event actions.

>statistics.exe --update-

actions

Page 135: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 135

Option Parameter Description Example

--all Performs all the actions made by the previously mentioned options: Calculates disk space, FTP, HTTP and mail traffic usage for all domains; Checks if domains expired and if the resources usage is within limits defined for the domains; Sends e-mail notifications about the domain expiration and/or exceeded limits; rotates action log and launches the limit reached event actions.

>statistics.exe --all

--

process-

domains

<domain

name>

Specifies the names of the domains for which the

statistics must be calculated.

Affects the --disk-usage,

--ftp-traffic and --

http-traffic options

when they are used

separately, or within the --

all option.

To calculate the amount of FTP traffic used only by domains example.com, sample.net,

sample1.org:

>statistics.exe --ftp-

traffic --process-

domains=example.com;sampl

e.net;sample1.org

--

process-

domain-

mask

<pattern> Specifies in a form of the mask the domains for which the statistics must be

calculated.

The pattern is an SQL LIKE clause -- a string containing the % and _ wildcards which stand for a string and a

character, correspondingly.

Affects the --disk-usage,

--ftp-traffic and --

http-traffic options

when they are used

separately, or within the --

all option.

To calculate the amount of disk space used by all domains which names end with ample.com

(sample.com, example.com, etc.):

>statistics.exe --disk-

usage --process-domain-

mask=%ample.com

To calculate HTTP traffic for all domains matching the pattern sm_th% (smyth.com, smath.org,

smuth.net, etc.):

>statistics.exe --http-

traffic --process-domain-

mask=sm_th%

--skip-

domains

<domain

name>

Specifies the names of the domains for which the statistics will not be

calculated.

Affects the --disk-usage,

--ftp-traffic and --

http-traffic options

when they are used

separately, or within the --

all option.

To calculate HTTP traffic for all domains matching the pattern sm_th% (smyth.com, smath.org, smuth.net, etc.) except for the domains smyths.org and smyths.info:

>statistics.exe --http-

traffic --process-domain-

mask=sm_th% --skip-

domains=smyths.org;smyths

.info

Page 136: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 136

Option Parameter Description Example

--skip-

domain-

mask

<pattern> Specifies in a form of the mask the domains for which the statistics must not be

calculated.

The pattern is an SQL LIKE clause -- a string containing the % and _ wildcards which stand for a string and a

character, correspondingly.

To calculate FTP traffic for all domain names not in a com zone:

>statistics.exe --ftp-

traffic --skip-domain-

mask=%com

--

single-

notify

Specifies that a notification about expired domain or exceeded limits must be sent

only once.

Has sense when used only with the --notify or --all

options.

>statistics.exe --notify

--single-notify

--

verbose

Specifies that a utility should be run in the verbose mode in which more information is

added to the statistics report.

>statistics.exe --verbose

Page 137: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 137

SQL Query Execution: dbclient.exe

The dbclient.exe utility serves to execute UPDATE and SELECT SQL queries against local or remote Microsoft SQL, MySQL and Jet databases, including Plesk database.

After executing SELECT queries, the utility returns queries results to standard output in the following format:

<field name>\t<field name>\t...\n

<field value>\t<field value>\t...\n

<field value>\t<field value>\t...\n

...

Note: The utility is available since Plesk 8.1.

Syntax

dbclient.exe --direct-sql --sql=<SQL query> [

<option1>=<param1>

<option2>=<param2>

...

<optionN>=<paramN>

Example

The following command run by an Administrator creates a new user interface template:

>dbclient.exe --direct-sql --sql="insert into itmpl(`name`)

values('custom template')"

Options

Option Parameter Description Example

--sql <query> Specifies the SQL query to be executed.

Required.

To retrieve the list of domain accounts from Plesk database provided by local MySQL server under user with login admin

and password setup:

>dbclient.exe --

direct-sql --

provider=MySQL -

-host=localhost

--db=psa --

login=admin --

--provider Jet |

MySQL |

MSSQL

Specifies the type of the SQL database server that will execute the query.

--host <host

name> Specifies the host where resides the database against which the query will

be executed.

--port <number> Specifies the number of port on which

the required database server listens to.

Page 138: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 138

Option Parameter Description Example

--db <database

name>

Specifies the name the SQL database (or, if Jet, path to the database file) against which the query will be

executed.

password=setup -

-port=3306 --

sql="select *

from domains"

--login <string> Specifies login of the database user

under which the query will be

executed.

--password <string> Specifies password of the database user under which the query will be

executed.

Note: If the utility is run with Administrator's rights, and the options --provider, --

host, --port --db, --login and --password are not specified, the query will be

executed against the Plesk database. In case when the utility is run without Administrator's rights, all the options are required no matter which database is the target.

Page 139: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 139

Subdomains: subdomain.exe

The subdomain.exe utility is designed to manage subdomain accounts. The utility allows the following:

creating, renaming, and removing subdomain

enabling scripting languages support for subdomains

restricting the use of disk space for subdomains

managing FTP user account for subdomains

Syntax

subdomain.exe <command> [<subdomain>] [

<option1><param1>[<param2>…<param n>]

[<option2><param1>[<param2>…<param n>]]

…[<option N><param1>[<param2>…<param n>]]

]

Example

The following command line creates the subdomain2.domain1.com subdomain in the

/httpdocs directory (once not specified explicitly, the default root directory is used),

sets the disk space quota for this subdomain to 50 MB, and enables the SSI support for this subdomain.

>subdomain.exe --create subdomain2 -domain domain1.com -hard_quota 50

-ssi true

Commands

Command Parameter Description Example

--create

or -c <subdomain

> Creates a subdomain on the domain specified by the -domain

option.

To create a subdomain on somewhere.com:

>subdomain.exe --create subdomain1

-domain somewhere.com

or

>subdomain.exe -c subdomain1 -

domain somewhere.com

--update

or -u <subdomain

> Updates the subdomain belonging to a domain specified by the -domain

option.

To update the name of the sub.somewhere.com subdomain with a new

one - subnew.somewhere.com:

>subdomain.exe --update sub -

domain somewhere.com -new_name

subnew

or

>subdomain.exe -u sub -domain

somewhere.com -new_name subnew

Page 140: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 140

Command Parameter Description Example

--remove

or -r <subdomain

> Removes one or more subdomains specified by the

-subdomains

option from a domain

specified by -

domain.

To remove subdomain1.somewhere.com from somewhere.com:

>subdomain.exe --remove subdomain1

-domain somewhere.com

or

>subdomain.exe -r subdomain1 -

domain somewhere.com

--info or

-i Retrieves the

information about all subdomains belonging to a specified

domain.

To retrieve the info about all subdomains of somewhere.com:

>subdomain.exe --info -domain

somewhere.com

or

>subdomain.exe -i -domain

somewhere.com

--help or

-h Displays help

on the use of

the utility.

To see the help info on the use of this utility:

>subdomain.exe -–help

or

>subdomain.exe -h

Options

Option Parameter Description Example

-domain or

-d <domain_name

> Specifies the parent domain the subdomain in

focus belongs to.

To create a subdomain on

somewhere.com:

>subdomain.exe --

create subdomain1 -

domain somewhere.com

-new_name <new_subdoma

in> Changes the name of a subdomain as specified. Cannot be used when

creating a subdomain.

To change the existing subdomain1.somewhere.com subdomain name to the new one - subdomain1_new.somewhere.com:

>subdomain.exe --

update subdomain1 -

domain somewhere.com -

new_name

subdomain1_new

-www true|false Adds the www prefix to the name of a subdomain. Is set to true

by default.

To remove the www prefix for subdomain1.somewhere.com

:

>subdomain.exe --

update subdomain1 -

domain somewhere.com -

www false

Page 141: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 141

Option Parameter Description Example

-ftp_user native|main If set to native, specifies that the subdomain uses its own FTP user account, and if set to „main‟, specifies the use of the FTP user account of the parent domain. Is

„main‟ by default.

To use a separate FTP account for subdomain1.somewhere.com

:

>subdomain.exe --

update subdomain1 -

domain somewhere.com -

ftp_user native

-login <login> Specifies the FTP user login. Can be specified only if the subdomain uses its own FTP

account.

To set the login for the FTP user:

>subdomain.exe --

update subdomain1 -

domain somewhere.com -

ftp_user native -login

johndoe

-passwd <password> Specifies the FTP user password. By default, the password is not set. Can be specified only if the subdomain uses its own

FTP account.

To set the new password for the FTP user:

>subdomain.exe --

update subdomain1 -

domain somewhere.com -

ftp_user native -login

johndoe -passwd 12345

-hard_quota <MB> Restricts the hard disk space used by the subdomain (in MB). If set to 0, means the unlimited disk space. Can be specified if the subdomain uses its own

FTP account.

To restrict the use of disk

space to 10 MB:

>subdomain.exe --

update subdomain1 -

domain somewhere.com -

ftp_user native -

hard_quota 10

-

write_modif

y

true|false Allows/Prohibits granting to the Plesk IIS User the Full access permission for the subdomain

httpdocs/ and

httpsdocs/ files and

subfolders (may be required for web applications correct functioning, but is

insecure).

Set to false by default.

Available since Plesk 8.1.1.

To allow Plesk IIS User write and modify files and

subfolders in httpdocs/

and httpsdocs/ folders of

subdomain subdomain1.somewhere.com

:

>subdomain.exe --

update subdomain1 -

domain somewhere.com -

write_modify true

Page 142: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 142

Option Parameter Description Example

-sb_publish true|false Sets the Publish site with SiteBuilder option. Is set

to false by default.

Available since Plesk 7.6.

To select the Publish site with SiteBuilder option for subdomain subdomain1.somewhere.com

:

>subdomain.exe --

update subdomain1 -

domain somewhere.com -

sb_publish true

-fp true|false Enables/disables FrontPage support on the subdomain. Is set to false

by default.

To enable FrontPage support on subdomain1.somewhere.com

:

>subdomain.exe --

update subdomain1 -

domain somewhere.com -

fp true

-fpauth true|false Allows the user to authorize in FrontPage before downloading content via FP . Is set to

false by default.

To allow FrontPage authoring on subdomain1.somewhere.com

:

>subdomain.exe --

update subdomain1 -

domain somewhere.com -

fpauth true

-

fp_no_index true|false Defines whether

FrontPage uses native WAIS search engine, or IIS Index Server for

indexing web sites.

Default value is false.

If on Virtuozzo, default

value is true.

Available since Plesk

8.1.1.

To make FrontPage use IIS Index Service on

subdomain1.example.com:

>subdomain.exe -u

subdomain1 -domain

example.com -

fp_no_index false

-ssi true|false Enables/disables SSI support on the subdomain. Is set to

false by default.

To enable SSI support on subdomain1.somewhere.com:

>subdomain.exe --

update subdomain1 -

domain somewhere.com -

ssi true

-ssi_html true|false Enables/disables SSI support for HTML, HTM files on the subdomain. .

Is set to false by default.

To enable SSI support for HTML, HTM files on subdomain1.somewhere.com

:

>subdomain.exe --

update subdomain1 -

domain somewhere.com -

ssi_html true

Page 143: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 143

Option Parameter Description Example

-php true|false Enables/disables PHP support on the subdomain. Is set to

false by default.

To enable PHP support on subdomain1.somewhere.com

:

>subdomain.exe --

update subdomain1 -

domain somewhere.com -

php true

-

php_version

4|5 Sets the Version option for the PHP support

parameter. Is set to 4 by

default.

To select PHP5 support on subdomain

subdomain1.somwhere.com:

>subdomain.exe -u

subdomain1 -domain

somewhere.com -

php_version 5

-php_isapi true|false Allows to run PHP as an ISAPI extension if set to true. Is set to false by

default.

To allow to run PHP as an ISAPI extension on subdomain1.somewhere.com

:

>subdomain.exe --

update subdomain1 -

domain somewhere.com -

php_isapi true

-cgi true|false Enables/disables CGI support on the subdomain. Is set to

false by default.

To enable CGI support on subdomain1.somewhere.com

:

>subdomain.exe --

update subdomain1 -

domain somewhere.com -

cgi true

-perl true|false Enables/disables PERL support on the subdomain Is set to false

by default.

To enable PERL support on subdomain1.somewhere.com

:

>subdomain.exe --

update subdomain1 -

domain somewhere.com -

perl true

-asp true|false Enables/disables ASP support on the subdomain. Is set to

false by default.

To enable ASP support on subdomain1.somewhere.com

:

>subdomain.exe --

update subdomain1 -

domain somewhere.com -

asp true

-miva true|false Enables/disables ASP support on the subdomain. Is set to

false by default.

To enable Miva support on subdomain1.somewhere.com

:

>subdomain.exe --

update subdomain1 -

domain somewhere.com -

miva true

Page 144: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 144

Option Parameter Description Example

-python true|false Enables/disables Python support on the subdomain. Is set to

false by default.

To enable Python support on subdomain1.somewhere.com

:

>subdomain.exe --

update subdomain1 -

domain somewhere.com -

python true

-coldfusion true|false Enables/disables ColdFusion support on the subdomain. Is set to

false by default.

To enable ColdFusion support on subdomain1.somewhere.com

:

>subdomain.exe --

update subdomain1 -

domain somewhere.com -

coldfusion true

-subdomains

or -s <subdomain

[, <…>]> Specifies the subdomains to remove or to retrieve info about. Is used in

combination with --

remove and --info

options respectively. If

the -subdomains option

is omitted , the --info

command outputs the info on all subdomains existing on the parent

domain.

To remove subdomain1.somewhere.com

from somewhere.com:

>subdomain.exe --

remove -subdomains

subdomain1 -domain

somewhere.com

To retrieve info about subdomain1.somewhere.com

:

>subdomain.exe --info

subdomain1 -domain

somewhere.com

-hst_type phys|virt Specifies the type of hosting used on the subdomain (i.e. physical or virtual). Is set to

„phys‟ (physical) by

default.

Available since Plesk 7.6.

To specify the use of virtual hosting on subdomain1.somewhere.com

:

>subdomain.exe --

update subdomain1 -

domain somewhere.com –

hst_type virt

-www_root * <www_root> Specifies the root directory for a subdomain on subfolder within the %plesk_vhosts%/

domain_name/

httpdocs

folder. Sets /httpdocs

by default. Requires

concomitant use of the -

create_phys option

with the false argument.

Available since Plesk 7.6.

To specify the /httpdocs/subdonsubf1 folder as the root directory for subdomain on subfolder subdomain1.somewhere.com:

>subdomain.exe –-

create subdomain1 –

domain somewhere.com -

hst_type virt –

www_root

/httpdocs/subdonsubf1

-create_phys false

Page 145: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 145

Option Parameter Description Example

-

create_phys

*

true|false Creates the root directory for a subdomain on subfolder within the %plesk_vhosts%/

domain_name/

httpdocs

folder. Sets the subdomain name as

the directory's

name. Is set to true by

default.

To create the /httpdocs/pics folder as the root directory for subdomain on subfolder

pics.somewhere.com:

>subdomain.exe –-

create pics –domain

somewhere.com -

hst_type virt

-asp.net true|false Enables/disables ASP.NET support on the subdomain. Is set to

false by default.

To enable ASP.NET support on subdomain1.somewhere.com

:

>subdomain.exe --

update subdomain1 -

domain somewhere.com -

asp.net true

-

asp.net_ver

sion

1.1|2.0 Specifies the version of Microsoft ASP.NET on the domain. The default

value is 1.1.

Available since Plesk 7.6.

To choose version 2.0 of Microsoft ASP.NET on subdomain1.somewhere.com

:

>subdomain.exe -u

subdomain1 -domain

somewhere.com -

asp.net_version 2.0

* The option is used only for Plesk subdomains on subfolders. By using this option, you

can only specify an already existing subfolder in the httpdocs directory.

Page 146: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 146

Virtual Directories: virtdir.exe

A virtual directory is created on the specified virtual host (domain or subdomain). There are two ways for a virtual directory to map physical site structure: It may cover a certain branch of the site folder structure, or a new physical directory of the same name may be created on the virtual host for that.

The virtual directories support implies an isolated and customizable access to a definite part of the physical structure of the site. The following settings are available:

virtual directories can provide public or restricted access

virtual directories can be configured for access via SSL

virtual directories provide flexible access settings for their contents and various objects they own

Also, visiting statistics can be enabled on a virtual directory.

In addition to that, a virtual directory can be specified as a web application after which its code will be executed within the process of IIS Application Pool. Also, the utility enables the user to optimize IIS settings for a web application (virtual directory) by setting it to execute in the multithreaded or a dedicated environment (MTA or STA mode).

Finally, virtual directories provide support for ASP.NET platform (versions 1.1 and 2.0) if the owner site supports it.

Syntax

virtdir.exe <command> [<name>] [

<option1> <param1>[<param2>…<param_N>]

[<option2> <param1>[<param2>…<param_N>]]

…[<option_n> <param1>[<param2>…<param_N>]]

]

Example

The following command line creates the /vd1 virtual directory on somedomain.com as

follows: it creates the physical directory in the root directory of the virtual host, reflects it to the new virtual directory; allows write access to the contents of the virtual directory (including the source code), disallows read access to these resources, allows viewing the contents of the virtual directory in a browser; disables logging visits on the virtual directory; makes the virtual directory function as a web application (from the standpoint of IIS); disallows running any scripts or executables; sets no default page to display in the browser if no particular page is specified by the user; allows public access to the virtual directory; turns off SSL support for this directory.

>virtdir.exe -c /vd1 -vhost somedomain.com -create_phys true -

access_source true -access_read false -access_write true -dir_browsing

true -log_visits false -create_app false -execute_perm none -

default_doc false -access_anonymous true -require_ssl false

Page 147: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 147

Commands

Command Parameter Description Example

--create

or -c <name> Creates a virtual

directory with the specified name relative to the site

root directory.

To create the /vd1 virtual directory on

domain somewhere.com:

>virtdir.exe --create /vd1 -vhost

somewhere.com –path /httpdocs

or

>virtdir.exe -c /vd1 -vhost

somewhere.com –path /httpdocs

--update

or -u <name> Updates

parameters of the

virtual directory.

To rename the /vd1 virtual directory to

/new_vd1 on somedomain.com:

>virtdir.exe --update /vd1 –vhost

somedomain –name new_vd1

or

>virtdir.exe -u /vd1 –vhost

somedomain –name new_vd1

--remove

or -r <name> Removes the virtual

directory. To remove the /vd1 virtual directory from

somedomain.com:

>virtdir.exe --remove /vd1 –vhost

somedomain

or

>virtdir.exe -r /vd1 -vhost

somedomain

--info

or -i <name> Retrieves the

information about the specified virtual

directory.

To retrieve the info about the /vd1 virtual

directory referring to somedomain.com:

>virtdir.exe --info /vd1 –vhost

somedomain

or

>virtdir.exe -i /vd1 –vhost

somedomain

--help

or -h Displays help on

the use of the

utility.

To see the help info on the use of this utility:

>virtdir.exe -–help

or

>virtdir.exe –h

Options

Option Parameter Description Example

-vhost <host_name> Specifies the name of the virtual host that owns the

virtual directory in focus.

Is required in all commands where a virtual

directory is specified.

To enable SSL for the /vd1 virtual directory on

somewhere.com:

>virtdir.exe --update

/vd1 –vhost somedomain

-require_ssl true

Page 148: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 148

Option Parameter Description Example

-

create_phy

s

true|false Indicates that a physical directory of the same name should be created for the new virtual

directory. If true, enables

creating the physical

folder. Is true by default.

Is available with the --

create command only.

To create the /vd1 virtual directory and a physical directory of the same name on

somedomain.com:

>virtdir.exe --create

/vd1 –vhost somedomain

-create_phys true

To create the /vd2 virtual

directory within /vd1 and a

physical directory of the same

name on somedomain.com:

>virtdir.exe --create

/vd1/vd2 –vhost

somedomain -create_phys

true

-name <relative_n

ame> Specifies the new name when it is necessary to rename the virtual

directory.

Is available with the --

update command only.

To rename the /vd1/vd2

virtual directory to /vd1/news

on somedomain.com:

>virtdir.exe --update

/vd1/vd2 –vhost

somedomain –name news

-path <relative_p

ath> Specifies the path of the physical directory mapped by the virtual directory. The path is specified relative to the root directory of the domain that owns this physical directory. Is set to „/‟ by default.

To redirect the /vd1/vd2

virtual directory from

/httpdocs/vd1/vd2 to

/httpdocs on

somedomain.com:

>virtdir.exe --update

/vd1/vd2 –vhost

somedomain –path

/httpdocs

-

access_sou

rce

true|false Enables/disables the user to access source code of ASP applications (residing within the specified virtual directory and its non-virtual subfolders) with read/write permissions (if

set). If set to true, access

is enabled. Is set to false

by default.

To enable the user to read scripts of ASP applications of

the /vd1 virtual directory on

somedomain.com:

>virtdir.exe --update

/vd1 vhost somedomain -

access_read true -

access_source true

-

access_rea

d

true|false Enables/disables read access permissions to files located within the specified virtual directory. If set to false, read

access is disabled. Is set

to true by default.

To enable read access to files

of the /vd1 virtual directory on

somedomain.com:

>virtdir.exe --update

/vd1 vhost somedomain -

access_read true

Page 149: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 149

Option Parameter Description Example

-

access_wri

te

true|false Enables/disables write access permissions to files located within the specified virtual directory.

If set to true, write

access is enabled. Is set

to false by default.

To enable write access to files of the /vd1 virtual directory on

somedomain.com:

>virtdir.exe --update

/vd1 vhost somedomain -

access_write true

-

dir_browsi

ng

true|false Enables/disables the user to see files and nested directories of the specified virtual directory in the

browser. If set to true,

browsing is enabled. Is set

to false by default.

To enable the user to browse the structure of the /vd1 virtual

directory on somedomain.com:

>virtdir.exe --update

/vd1 vhost somedomain -

dir_browsing true

-

log_visits true|false Enables/disables logging

user visits of the specified virtual directory. If set to

false, disables logging.

Is set to true by default.

To enable logging of visits to

the /vd1 virtual directory on

somedomain.com:

>virtdir.exe --update

/vd1 vhost somedomain -

log_visits true

-

create_app true|false Makes the specified virtual

directory function an IIS

application. If false, this

option is disabled. Is true

by default (i.e. virtual directories are created as

IIS applications).

To make the /vd1 virtual

directory an IIS application:

>virtdir.exe --update

/vd1 vhost somedomain -

create_app true -

run_in_mta false

-

execute_pe

rm

<none |

script |

script_exec

ute>

Specifies the execution permission level for files located within the specified virtual directory. If set to NONE, allows the display of static files (HTML, images, etc.) only. If set to SCRIPT, allows the execution of scripts only. If set to SCRIPT_EXECUTE, allows the execution of all files, including scripts and

executables.

To restrict the running of executables, but allow all other

files of the /vd1 virtual

directory to execute:

>virtdir.exe --update

/vd1 vhost somedomain -

execute_perm script

Page 150: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 150

Option Parameter Description Example

-

parent_pat

hs

true|false Enables/disables active scripts of the specified virtual directory to use relative paths to access its parent directories (using the .. syntax). If set to

true, the option is

enabled. If so, it is

recommended that the -

execute_perm option is

set to NONE.

Is available with the -

create_app option set to

TRUE only.

To enable access to parent directories of the /vd1 virtual

directory by a relative path:

>virtdir.exe --update

/vd1 vhost somedomain -

execute_perm none -

parent_paths true

-

run_in_mta true|false Enables/disables the

running of the IIS application (located in the specified virtual directory) in the multithreaded apartment (MTA). If set to

true, the MTA mode is

enabled.

Is available with the -

create_app option set to

true only.

To set the IIS application stored in the /vd1 virtual directory to

be executed in a dedicated

process (STA):

>virtdir.exe --update

/vd1 vhost somedomain -

create_app true -

run_in_mta false

-

default_do

c

true|false Enable/disable the display of the default page when the user enters the specified virtual directory with no particular file name

specified. If set to false,

no default page is used and two cases are

possible:

- if the -dir_browsing

option is true, a list of all

files and nested directories in FTP style is displayed;

- if -dir_browsing is

FALSE, the ACCESS FORBIDDEN message is

displayed.

To disable the display of a default file and to list the

contents for the /vd1 virtual

directory on somedomain.com:

>virtdir.exe --update

/vd1 vhost somedomain -

dir_browsing true -

default_doc false

Page 151: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 151

Option Parameter Description Example

-

default_do

c_order

<doc1>,

<doc2>, …,

<doc_N>

Specifies the prioritized list of default pages for IIS to search within the virtual directory. The first match is displayed. If no match is found, displayed is the list of all files and nested

folders in FTP style.

The option is available with the -default_doc

option enabled.

To specify the list of default pages for the /vd1 virtual

directory:

>virtdir.exe --update

/vd1 vhost somedomain -

default_doc true -

default_doc_order

index.html, page1.html

-

access_ano

nymous

true|false Enables/disables public access to the virtual

directory. If true, the user

can access the directory

without authentication.

To restrict access to the /vd1

virtual directory:

>virtdir.exe --update

/vd1 vhost somedomain -

access_anonymous false

-

require_ss

l

true|false Enables/disables SSL access to the virtual

directory. If true, the

virtual directory can be

accessed via SSL only.

To enables SSL access to the /vd1 virtual directory:

>virtdir.exe --update

/vd1 vhost somedomain -

require_ssl true

-

php_versio

n

4|5 Sets the PHP Settings:PHP Version

parameter. Is set to 4 by

default.

To select PHP5 support for the /vd1 virtual directory:

>virtdir.exe --update

/vd1 vhost

somedomain.com -

php_version 5

-

asp.net_ve

rsion

1.1 | 2.0 Specifies the ASP.NET version. Is available with

the -create_app option

enabled and ASP.NET supported on the virtual host.

To select ASP.NET version 2.0 for web applications located in

the /vd1 virtual directory:

>virtdir.exe --update

/vd1 vhost somedomain -

create_app true -

asp.net_version 2.0

Page 152: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 152

Web Users: webuser.exe

The webuser.exe utility serves to manage web user accounts. The utility allows the following operations:

creating and removing web user accounts

viewing information about web user accounts

changing web user account settings (disk space limit, scripting languages support, etc.)

Syntax

webuser.exe <command> [<login_name>] [

<option1><param> [<option2><param>]…[<option N><param>]

]

Example

The following command creates the johndoe web user account on domain1.com with the MyPass password, enables PHP support for it, and restricts the use of disk space to 50 Mbytes.

>webuser.exe --create johndoe -domain domain1.com -passwd MyPass -php

true -quota 50

Commands

Command Parameter Description Example

--create

or -c <login_n

ame> Creates a web

user account.

To create a web user account with login Jonny

and password somepass on sampledomain.com:

>webuser.exe --create Jonny -domain

sampledomain.com -passwd somepass

or

>webuser.exe -c Jonny -domain

sampledomain.com -passwd somepass

--update

or -u <login_n

ame> Updates the existing web user account with data specified in the

options to follow.

To update the Jonny web use account with PHP support on sampledomain.com:

>webuser.exe --update Jonny -domain

sampledomain.com -php true

or

>webuser.exe -u Jonny -domain

sampledomain.com -php true

Page 153: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 153

Command Parameter Description Example

--remove

or -r <login_n

ame> Deletes the specified web

user account.

To delete the Jonny web user account from sampledomain.com:

>webuser.exe --remove Jonny -domain

sampledomain.com

or

>webuser.exe -r Jonny -domain

sampledomain.com

--info

or -i <login_n

ame> Retrieves the information about the specified web

user account.

To view the info on the Jonny web user account on sampledomain.com:

>webuser.exe --info Jonny -domain

sampledomain.com

or

>webuser.exe -i Jonny -domain

sampledomain.com

--help

or -h Displays help on

the use of the

utility.

To view the help info on the use of this utility:

>webuser.exe --help

or

>webuser.exe -h

Options

Option Parameter Description Example

-domain <domain_

name> Specifies the name of the domain owing the web user account. Is required for all commands, except --

help.

-passwd <passwd> Sets the web user password. Is required when creating the web user account with the --

create command.

To change the password for the Jonny web user to somepass on sampledomain.com:

>webuser.exe --update Jonny -

domain sampledomain.com -passwd

somepass

-quota <MB> Sets the maximal amount of disk space allowed for use by the web user (in MB). If set to 0, the disk space is

unlimited.

To set the disk space quota for the Jonny web user on sampledomain.com to 20

MB:

>webuser.exe -u Jonny -domain

sampledomain.com -quota 20

-php true|fal

se Enables/disables PHP support for the web user.

Is false by default.

To enable PHP support for the Jonny web user on sampledomain.com:

>webuser.exe -u Jonny -domain

sampledomain.com -php true

Page 154: Plesk Command Line Interface - download1.swsoft.comdownload1.swsoft.com/Plesk/Plesk8.2/Doc/plesk-8.2-win-cli.pdf · 5 About This Guide This document contains a complete description

Using Command Line Utilities 154

Option Parameter Description Example

-ssi true|fal

se Enables/disables SSI support for the web user.

Is false by default.

To enable SSI support for the Jonny web user on sampledomain.com:

>webuser.exe -u Jonny -domain

sampledomain.com -ssi true

-cgi true|fal

se Enables/disables CGI support for the web user.

Is false by default.

To enable CGI support for the Jonny web

user on sampledomain.com:

>webuser.exe -u Jonny -domain

sampledomain.com -cgi true

-perl true|fal

se Enables/disables Perl support for the web user.

Is false by default.

To enable Perl support for the Jonny web user on sampledomain.com:

>webuser.exe -u Jonny -domain

sampledomain.com -perl true

-python true|fal

se Enables/disables Python support for the web user.

Is false by default.

To enable Python support for the Jonny web user on sampledomain.com:

>webuser.exe -u Jonny -domain

sampledomain.com -python true

-asp true|fal

se Enables/disables Microsoft ASP support for the web user. Is

false by default.

To enable Microsoft ASP support for the Jonny web user on sampledomain.com:

>webuser.exe -u Jonny -domain

sampledomain.com -asp true

-

asp_dot

_net

true|fal

se Enables/disables Microsoft ASP.NET support for the web user.

Is false by default.

To enable Microsoft ASP.NET support for the Jonny web user on

sampledomain.com:

>webuser.exe -u Jonny -domain

sampledomain.com -asp_dot_net

true

-miva true|fal

se Enables/disables Miva support for the web user.

Is false by default.

To enable Miva support for the Jonny web user on sampledomain.com:

>webuser.exe -u Jonny -domain

sampledomain.com -miva true

-

write_m

odify

true|fal

se

Allows/Prohibits granting to the Plesk IIS User and the Plesk Domain User accounts created for the

web user

the Full access permission for the

domain httpdocs/ and

httpsdocs/ files and

subfolders (may be required for web applications correct functioning, but is

insecure).

Set to false by default.

Available since Plesk 8.1.1.

To allow Plesk IIS User/Plesk Domain User write and modify files and subfolders in the home folder of the Jonny web user

on sampledomain.com:

>webuser.exe -u Jonny -domain

sampledomain.com -write_modify

true