Skip to content

Instantly share code, notes, and snippets.

@johnbabb
Last active June 25, 2020 16:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnbabb/2478fad0f6b46d1dc3ad126e1c1e5762 to your computer and use it in GitHub Desktop.
Save johnbabb/2478fad0f6b46d1dc3ad126e1c1e5762 to your computer and use it in GitHub Desktop.
To Export the Application Pools on IIS 7 :
%windir%\system32\inetsrv\appcmd list apppool /config /xml > c:\apppools.xml
To import the Application Pools:
%windir%\system32\inetsrv\appcmd add apppool /in < c:\apppools.xml
To Export all you’re website:
%windir%\system32\inetsrv\appcmd list site /config /xml > c:\sites.xml
To Export a single website:
%windir%\system32\inetsrv\appcmd list site <var_site_name> /config /xml > c:\sites.xml
To Import the website:
%windir%\system32\inetsrv\appcmd add site /in < c:\sites.xml
To export/import a single application pool:
%windir%\system32\inetsrv\appcmd list apppool <var_app_pool_name> /config /xml > c:\myapppool.xml
For further information: Exporting and Importing Sites and App Pools from IIS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment