How to Backup and Restore IIS
We often require the capability of backing up and restoring IIS Configurations. The use-cases vary from doing a quick PoC, taking backup of production IIS Server or quick demo.
appcmd tool is versatile tool to take a backup of IIS Configuration.
Backup IIS
>%windir%\system32\inetsrv\appcmd.exe add backup "vanillaiisconfig-16-Apr-2021"
Restoring IIS Backup
>%windir%\system32\inetsrv\appcmd.exe restore backup "vanillaiisconfig-16-Apr-2021"
List all IIS Backup
>%windir%\system32\inetsrv\appcmd.exe list backup