How to change IP addresses of multiple subscriptions with the script

Refers to:

  • Plesk 11.5 for Windows

Created:

2016-11-16 12:45:19 UTC

Modified:

2016-12-21 19:08:18 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to change IP addresses of multiple subscriptions with the script

Question

How may the IPs be changed for the certain subscriptions?

Answer

  1. Collect the list of subscriptions you are about to change IP addresses in text file C:\\domains.txt . Write each subscription name in new line.

    To get a list of all subscription run following command in Command Line:

    "%plesk_bin%\\dbclient.exe" --direct-sql --sql="select name from domains where webspace_id=0" > C:\\domains.txt
  2. Save the file and close.

  3. Open Command Line and run the following script:
    for /F "tokens=1" %d in ('type C:\\domains.txt') do "%plesk_cli%"\\domain.exe" -u %d -ip <NEW_IP>
Have more questions? Submit a request
Please sign in to leave a comment.