How to change IP addresses of multiple subscriptions with the script

Created:

2016-11-16 12:45:19 UTC

Modified:

2017-04-24 11:20:40 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to change IP addresses of multiple subscriptions with the script

Applicable to:

  • Plesk for Windows

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

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