How to Back Up and Restore IIS Configuration with AppCmd
Applies to: Windows Server 2019, 2022 and 2025.
IIS configuration backup captures applicationHost.config and related server settings, not website content, certificates, databases or every external dependency.
Web-server changes can expose data or interrupt production traffic. Use backups, least privilege and a staged validation path. Visit networkmanager.info for managed Windows VPS services.
Prerequisites
- Use elevated Command Prompt.
- Back up content and certificates separately.
- Choose a descriptive backup name.
- Test restore in a non-production environment.
Procedure
Step 1: Create IIS backup
Use AppCmd from inetsrv.
%windir%\system32\inetsrv\appcmd add backup BeforePortalChangeStep 2: List backups
Confirm timestamp and name.
%windir%\system32\inetsrv\appcmd list backupStep 3: Export supporting inventory
Capture sites, pools and bindings.
%windir%\system32\inetsrv\appcmd list site
%windir%\system32\inetsrv\appcmd list apppoolStep 4: Make the approved change
Keep content and certificate backup available.
Step 5: Restore when required
Restore the named configuration backup.
%windir%\system32\inetsrv\appcmd restore backup BeforePortalChangeVerification
After restore, inspect sites, pools, bindings and application response.
%windir%\system32\inetsrv\appcmd list site
%windir%\system32\inetsrv\appcmd list apppoolRollback
The restore command is itself rollback. If it fails, recover configuration, content and certificates from the broader system backup.
Security notes
Protect backups because configuration can contain paths, identities and connection information.
Official references
Explore Netcloud24 Canada.