Is there any way to export and import the single iis website from one server to another.
Thanks, Sandesh
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this communityYes you can, everything is in the IISAdministration Powershell module, using the Export-IISConfiguration
cmdlet. You can visit this MS docs link to review what cmdlets best suit your specific needs.
You can also use a couple of commands: To Export 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
Hope that helps a bit!
%windir%\system32\inetsrv\appcmd list apppool /config /xml > c:\apppools.xml
and %windir%\system32\inetsrv\appcmd add apppool /in < c:\apppools.xml
appcmd list apppool /config
command though - it exports the application pool passwords in clear text!