How to export all application pools on iis7 +:
% WINDIR %/system32/inetsrv/appcmd list apppool/config/XML> C:/apppools. xml
This command will export all the application pools on the server, but some of them are unnecessary and need to be deleted. For example:
Defaultapppool
Classic. Net apppool
If an application pool with the same name already exists during import, the import will fail.
How to import an application pool:
% WINDIR %/system32/inetsrv/appcmd add apppool/in <C:/apppools. xml
In this way, all application pools can be imported to another server.
How to export all sites:
% WINDIR %/system32/inetsrv/appcmd list site/config/XML> C:/sites. xml
Similarly, we need to edit the sites. xml file to delete unnecessary sites. For example:
Default website
How to import sites:
% WINDIR %/system32/inetsrv/appcmd add site/in <C:/sites. xml
Now, the import is complete. Check whether the IIS configurations of the two servers are the same.
In addition, we will introduce how to export and import a site separately.
Export a separate application pool:
% WINDIR %/system32/inetsrv/appcmd list apppool "application pool name"/config/XML> C:/myapppool. xml
The name of the application pool to be exported in yellow
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 "site name"/config/XML> C:/mywebsite. xml
The site name to be exported in yellow
Import a separate site:
% WINDIR %/system32/inetsrv/appcmd add site/in <C:/cnziben.com. xml
Reference: http://www.microsoftpro.nl/2011/01/27/exporting-and-importing-sites-and-app-pools-from-iis-7-and-7-5/
How to export all application pools on iis7: bind domain names in batches