Appcmd Command Import Export site vs. application pool

Source: Internet
Author: User

How to export all application pools on iis7+:

%windir%\system32\inetsrv\appcmd list Apppool/config/xml > C:\apppools.xml

This command will export all of the application pools on the server, but some of us we don't need to erase them. For example:

    • DefaultAppPool
    • Classic. Net AppPool

If you find an application pool with the same name already exists at import, the import will fail.

ways to import application pools:

%windir%\system32\inetsrv\appcmd Add Apppool/in < C:\apppools.xml

This allows you to import all of your application pools to another server.

ways to export all sites:

%windir%\system32\inetsrv\appcmd list Site/config/xml > C:\sites.xml

Again, we need to edit the Sites.xml file to delete unwanted sites. For example:

    • Default Website

ways to import a site:

%windir%\system32\inetsrv\appcmd Add Site/in < C:\sites.xml

Now that the import is done, look at the IIS configuration of the two servers.

In addition, the introduction of a separate export to import a site method

To export a separate application pool:

%windir%\system32\inetsrv\appcmd list AppPool "Application pool name"/config/xml > C:\myapppool.xml

The yellow font is the name of the application pool to export

To import a separate application pool:

%windir%\system32\inetsrv\appcmd Add apppool/in < C:\myapppool.xml

To export a separate site:

%windir%\system32\inetsrv\appcmd list site name/config/xml > C:\mywebsite.xml

The yellow font is the name of the site to export

To import a separate site:

%windir%\system32\inetsrv\appcmd Add Site/in < C:\mywebsite.xml

Appcmd Command Import Export site vs. application pool

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.