Iis – Export & Import – Single IIS WebSites using powershell

iispowershell

Is there any way to export and import the single iis website from one server to another.

Thanks,
Sandesh

Best Answer

Yes 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!