• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

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