Export and Import IIS Site and Application Pool Configuration [Answered]RSS

1 reply

Last post Dec 24, 2013 10:35 PM by Angie xu - MSFT

  • Export and Import IIS Site and Application Pool Configuration

    Dec 23, 2013 06:22 PM|GJCanon|LINK


    We have a large server farm and I'd like to ensure that the configuration of a specific site and application pool is 100% consistent across each node. Ideally, I'd like to create the XML configuration in a development environment and then using PowerShell import that on each node.

    For example, the settings in the application pool wont change based on node. Note this is just dummy settings.

    <add name="www.node.local" queueLength="1000" autoStart="true" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated">
                    <processModel identityType="NetworkService" userName="" password="" loadUserProfile="true" idleTimeout="00:20:00" maxProcesses="1" shutdownTimeLimit="00:01:30" startupTimeLimit="00:01:30" pingingEnabled="true" pingInterval="00:00:30" pingResponseTime="00:01:30" />
                    <recycling disallowOverlappingRotation="false" disallowRotationOnConfigChange="false" logEventOnRecycle="Time, Memory, PrivateMemory">
                        <periodicRestart memory="0" privateMemory="0" requests="0">
                                <clear />
                                <add value="00:01:00" />
                                <add value="00:02:00" />
                    <cpu limit="0" action="NoAction" resetInterval="00:05:00" smpAffinitized="false" smpProcessorAffinityMask="4294967295" />
                    <failure loadBalancerCapabilities="HttpLevel" orphanWorkerProcess="false" orphanActionExe="" orphanActionParams="" rapidFailProtection="true" rapidFailProtectionInterval="00:05:00" rapidFailProtectionMaxCrashes="5" autoShutdownExe="" autoShutdownParams="" />

    Or for the site it wouldn't change either:

                <site name="www.node.local" id="36" serverAutoStart="true">
                    <application path="/" applicationPool="www.node.local">
                        <virtualDirectory path="/" physicalPath="E:\WebContent\www.node.local" />
                        <binding protocol="https" bindingInformation="*:443:www.node.local" />
                    <logFile directory="E:\Logs\LogFiles" />
        <location path="www.node.local">
                    <forms cookieless="UseUri" />
                        <windowsAuthentication enabled="true">
                                <remove value="Negotiate" />
                                <remove value="NTLM" />
                                <add value="NTLM" />
                                <add value="Negotiate" />

    Is there a way to export these elements and then import them onto another machine? I could control most of this via the web.config, but for now my question is focused on export and import of application pool, site and site location configuration.

    Is this possible?

    restore import backup deploy export

  • Re: Export and Import IIS Site and Application Pool Configuration

    Dec 24, 2013 10:35 PM|Angie xu - MSFT|LINK

    Hi GJCanon

    I notice that there are relevant topics about exporting and importing Sites and App Pools from IIS 7 and 7.5,

    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 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 “MyAppPool” /config /xml > c:\myapppool.xml

    For further information: Exporting and Importing Sites and App Pools from IIS

    Best regards


    Angie xu

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.