Export a website example (thru command prompt)
C:\Windows\SysWOW64\inetsrv\appcmd list site /name:"Default Web Site" /config /xml > C:\Export.xml
Import a website example (thru command prompt)
C:\Windows\SysWOW64\inetsrv\appcmd add sites /in< C:\Export.xml
Delete a website example (thru command prompt)
C:\Windows\SysWOW64\inetsrv\appcmd delete site "Default Web Site"
The above commands are for 64 bit machines, for 32 bit machines, SysWow64 would be replaced by System32
C:\Windows\SysWOW64\inetsrv\appcmd list site /name:"Default Web Site" /config /xml > C:\Export.xml
Import a website example (thru command prompt)
C:\Windows\SysWOW64\inetsrv\appcmd add sites /in< C:\Export.xml
Delete a website example (thru command prompt)
C:\Windows\SysWOW64\inetsrv\appcmd delete site "Default Web Site"
The above commands are for 64 bit machines, for 32 bit machines, SysWow64 would be replaced by System32