• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Question Scripting Plesk install via Powershell

WindowsSysadmin

New Pleskian
Hi All,

I'm a Windows sysadmin and I am currently working on a series of Automation tasks for the company that I work with - the end goal being a consistent delivery of services and products (as currently, on 4 different servers one would find 5 different ways of doing the same thing).

To that end, I am looking at installing Plesk via PowerShell so that I can pass a standard set of variables and some known options to the Plesk installer, resulting in a consistent experience.

My question is this - Does Plesk have any support for installation via Powershell or any resources on this?

If not, are there any plans to give Plesk some form of functionality via Powershell?
 
very simple PowerShell script you can use for installing Plesk:
Code:
$source = "http://autoinstall-win.plesk.com/plesk-installer.exe"
$destination = "C:\Windows\Temp\plesk-installer.exe"

Invoke-WebRequest $source -OutFile $destination

& $destination install panel 17.0.17 --preset Recommended

What type of integration will fit your scenario better? Cmdlet with arguments?
 
very simple PowerShell script you can use for installing Plesk:
Code:
$source = "http://autoinstall-win.plesk.com/plesk-installer.exe"
$destination = "C:\Windows\Temp\plesk-installer.exe"

Invoke-WebRequest $source -OutFile $destination

& $destination install panel 17.0.17 --preset Recommended

What type of integration will fit your scenario better? Cmdlet with arguments?

Hi Pavel - thanks for the response.

Ideally I'd like to be able to pass various configuration items via PS to the installer - so for example:
Code:
Import-Module Plesk
$IIS = "F:\vhosts"
$SQLDD = " E:\SQL\Data"
$SQLLD = "E:\SQL\Log"
$PHPVer = "5.5, 5.4, 7.0"
$PathtoLicFile = "C:\Plesk-temp\Licence.lic"

Install-Plesk -Licence $PathtoLicFile -IISDirectory $IIS -sqldatadirectory $SQLDD -sqllogdirectory $SQLLD -PHPVersions $PHPVer -Spamassassin $False -ClamAV $True etc. etc.

It would also be nice if the Microsoft components (such as if you choose to install MS SQL as part of the Plesk install) had their configuration items exposed to PS so they could be configured in our preferred manner on Install, without having to go back in and tweak - this should be relatively easy as most MS installs have native PS support for installation and configuration

If you are going to look at creating a PS module with Cmdlets - then being able to get and set various Plesk configuration items and settings via Powershell would make me a very happy Sysadmin indeed (such as the ability to create, get, set and remove Subscriptions from PS as separate cmdlets, the ability to get and set the Server configuration)


Failing that - Igor's suggestion may provide a satisfactory alternative, however I would still very much love to have Powershell functionality for controlling Plesk in a windows environment, especially as it allows us greater freedom in terms of automation and flexibility for managing our Plesk Nodes and is very much a standard method of Managing for enterprise applications running on a Windows environment.
 
Last edited:
Back
Top