Microsoft IIS backup and restore IIS Website Configurations for both Command Prompt and PowerShell

preview_player
Показать описание
Backup IIS and Restore IIS Website Configuration with Command Prompt and also PowerShell.

CMD
xcopy "C:\Windows\System32\inetsrv\backup\*" "G:\Backup\IIS Backups" /i /s /y

Restore

PowerShell
Backup-WebConfiguration -Name PS-03-24-2022
Copy-Item "C:\Windows\System32\inetsrv\backup\PS-YOURBACKUPFOLDER" -Destination "G:\Backup\IIS Backups\" -Recurse

Restore
Restore-WebConfiguration -Name PS-YOURBACKUPFOLDER

Thank You
Wayne Barron
CFF Coding Source
Рекомендации по теме
Комментарии
Автор

@Coding Source
I'm new to server migration. I have to migrate my company's public website from the 2012 server to the 2019 server. If I run the backup command on the 2012 server and store the files to a backup folder location; and then run the restore command to transfer the files on the 2019 server, will it automatically add all the files to the appropriate folders in IIS manager (on 2019 server)? If so, from there will I just need to ensure I can access the website on the 2019 server?

terrirutledge
Автор

restore backup /stop:true 20140707T103046
ERROR ( hresult:80070426, message:Command execution failed.
The service has not been started.


getting this error

lekhasharma
visit shbcf.ru