Backup/Restore IIS 7/8.5 Websites/AppPools

For exporting all AppPools use command:

%windir%\system32\inetsrv\appcmd list apppool /config /xml > c:\apppools.xml

For importing all AppPools:

%windir%\system32\inetsrv\appcmd add apppool /in < c:\apppools.xml

For exporting all WebSites:

%windir%\system32\inetsrv\appcmd list site /config /xml > c:\sites.xml

For importing all WebSites:

%windir%\system32\inetsrv\appcmd add site /in < c:\sites.xml

Notice!
After exporting xml files created can have UCS-2 Little Endian encoding. In this case you should change the file encoding to UTF8 for example to import without errors.

Leave a Reply

Your email address will not be published. Required fields are marked *