Home >Operation and Maintenance >Windows Operation and Maintenance >Detailed introduction on how to export all application pools on IIS7 and batch domain name binding
Method to export all application pools on IIS7+:
%win dir %/system32/inetsrv/appcmd list apppool /config / xml > c:/apppools.xml
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
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
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
Similarly, We need to edit the sites.xml fileDeleteunnecessary sites. For example:
Default Website
How to import sites:
%windir%/system32/inetsrv/appcmd add site /in < c:/sites.xml
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
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
Export a separate site:
%windir%/system32/inetsrv/appcmd list site “站点名称” /config /xml > c:/mywebsite.xml
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
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!