Monday, 21 November 2011

IIS 6 - Backup and Restore

All below steps involved in the command line:

/sp = source path

/lm = local machine

/dp = destination path

/d = password == /d passwordneedstowrite

/f c:\path = Pathname



Go to command prompt and type:

iiscnfg

Enter

The script does not work with WScript

Would you like to register CScript as your default host for VBScript

Click Yes to register CScript iiscnfg /export /sp /lm /children /inherited /d password /f c:\IISConfig.bak

Go to the directory where you backup the configuration: cd\ dir *.bak

To see the backup file use the below command: more IISConfig.bak iiscnfg /import /dp /lm /sp /lm /children /inherited /d password /f c:\IISConfig.bak