Import/Export IIS Site and App Pool Configuration

To run following scripts, open Command Prompt as Administrator.

Exporting:
To export app pools, need to run following script.

%windir%\system32\inetsrv\appcmd list apppool /config /xml > c:\"Folderthat you want to create"\apppools.xml

To export site pools, need to run following script.

%windir%\system32\inetsrv\appcmd list site /config /xml > c:\"Folder that you want to create"\sites.xml

Importing:

%windir%\system32\inetsrv\appcmd add apppool /in < c:\"Folder that you copied"\apppools.xml

%windir%\system32\inetsrv\appcmd add site /in < c:\"Folder that you copied"\sites.xml

Leave a Reply