Detailed introduction on how to export all application pools on IIS7 and batch domain name binding

黄舟
Release: 2017-06-05 09:27:37
Original
1866 people have browsed it

Method to export all application pools on IIS7+:

%win dir %/system32/inetsrv/appcmd list apppool /config / xml > c:/apppools.xml
Copy after login

This command will export all application pools on the server, but some of them are not needed by us, so we need to export them. They are deleted. For example:

DefaultAppPool Class ic .Net AppPool
Copy after login

If it is found that the application pool with the same name already exists during import, then the import will fail.

Method to import the application pool:

%windir%/system32/inetsrv/appcmd add apppool /in < c:/apppools.xml
Copy after login

In this way, all application pools can be imported into another server.

Method to export all sites:

%windir%/system32/inetsrv/appcmd list site /config /xml > c:/sites.xml
Copy after login

Similarly, We need to edit the sites.xml fileDeleteunnecessary sites. For example:

Default Website
Copy after login

How to import sites:

%windir%/system32/inetsrv/appcmd add site /in < c:/sites.xml
Copy after login

At this point, the import work Done, let’s see if the IIS configurations of the two servers are the same.

In addition, let’s introduce the method of exporting and importing a site separately
Export a separate application pool:

%windir%/system32/inetsrv/appcmd list apppool “应用程序池名称” /config /xml > c:/myapppool.xml
Copy after login

The yellow font is the name of the application pool to be exported

Import a separate application pool:

%windir%/system32/inetsrv/appcmd add apppool /in < c:/myapppool.xml
Copy after login

Export a separate site:

%windir%/system32/inetsrv/appcmd list site “站点名称” /config /xml > c:/mywebsite.xml
Copy after login

Yellow font is the name of the site to be exported

Import a separate site:

%windir%/system32/inetsrv/appcmd add site /in < c:/cnziben.com.xml
Copy after login

The above is the detailed content of Detailed introduction on how to export all application pools on IIS7 and batch domain name binding. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!